Completed
Branch master (2d4977)
by Michael
03:20
created
admin/update.php 2 patches
Indentation   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -23,18 +23,18 @@  discard block
 block discarded – undo
23 23
 	$dbupdater = new WfdownloadsDbupdater();
24 24
 
25 25
 	if (!wfdownloads_TableExists('wfdownloads_meta')) {
26
-	    // Create table wfdownloads_meta
27
-        $table = new WfdownloadsTable('wfdownloads_meta');
28
-        $table->setStructure(	"CREATE TABLE %s (
26
+		// Create table wfdownloads_meta
27
+		$table = new WfdownloadsTable('wfdownloads_meta');
28
+		$table->setStructure(	"CREATE TABLE %s (
29 29
         						metakey varchar(50) NOT NULL default '',
30 30
         						metavalue varchar(255) NOT NULL default '',
31 31
         						PRIMARY KEY (metakey))
32 32
         						ENGINE=MyISAM;");
33 33
 
34
-        $table->setData(sprintf("'version', %s", round($GLOBALS['xoopsModule']->getVar('version') / 100, 2)));
35
-        if ($dbupdater->updateTable($table)) {
36
-            echo "wfdownloads_meta table created<br />";
37
-        }
34
+		$table->setData(sprintf("'version', %s", round($GLOBALS['xoopsModule']->getVar('version') / 100, 2)));
35
+		if ($dbupdater->updateTable($table)) {
36
+			echo "wfdownloads_meta table created<br />";
37
+		}
38 38
 	}
39 39
 
40 40
 	$download_fields = array(
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
 	$download_table = new WfdownloadsTable("wfdownloads_downloads");
86 86
 	$fields = get_table_info($download_handler->table, $download_fields);
87 87
 	// Check for renamed fields
88
-    rename_fields($download_table, $renamed_fields, $fields, $download_fields);
88
+	rename_fields($download_table, $renamed_fields, $fields, $download_fields);
89 89
 	update_table($download_fields, $fields, $download_table);
90
-    if ($dbupdater->updateTable($download_table)) {
91
-        echo "Downloads table updated<br />";
92
-    }
90
+	if ($dbupdater->updateTable($download_table)) {
91
+		echo "Downloads table updated<br />";
92
+	}
93 93
 	unset($fields);
94 94
 
95 95
 	$mod_fields = array(
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	rename_fields($mod_table, $renamed_fields, $fields, $mod_fields);
144 144
 	update_table($mod_fields, $fields, $mod_table);
145 145
 	if ($dbupdater->updateTable($mod_table)) {
146
-	    echo "Modified Downloads table updated <br />";
146
+		echo "Modified Downloads table updated <br />";
147 147
 	}
148 148
 	unset($fields);
149 149
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	$fields = get_table_info($cat_handler->table, $cat_fields);
172 172
 	update_table($cat_fields, $fields, $cat_table);
173 173
 	if ($dbupdater->updateTable($cat_table)) {
174
-	    echo "Category table updated<br />";
174
+		echo "Category table updated<br />";
175 175
 	}
176 176
 	unset($fields);
177 177
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	$fields = get_table_info($broken_handler->table, $broken_fields);
191 191
 	update_table($broken_fields, $fields, $broken_table);
192 192
 	if ($dbupdater->updateTable($broken_table)) {
193
-	    echo "Broken Reports table updated<br />";
193
+		echo "Broken Reports table updated<br />";
194 194
 	}
195 195
 	unset($fields);
196 196
 }
@@ -202,31 +202,31 @@  discard block
 block discarded – undo
202 202
 // =========================================================================================
203 203
 function invert_nohtm_dohtml_values()
204 204
 {
205
-    $ret = array();
205
+	$ret = array();
206 206
 	global $xoopsDB;
207 207
 	$cat_handler = xoops_getmodulehandler('category', 'wfdownloads');
208 208
 	$result = $xoopsDB->query("SHOW COLUMNS FROM ".$cat_handler->table);
209 209
 	while ($existing_field = $xoopsDB->fetchArray($result)) {
210
-	     $fields[$existing_field['field']] = $existing_field['type'];
210
+		 $fields[$existing_field['field']] = $existing_field['type'];
211 211
 	}
212 212
 	if (in_array("nohtml", array_keys($fields))) {
213
-	    $dbupdater = new WfdownloadsDbupdater();
213
+		$dbupdater = new WfdownloadsDbupdater();
214 214
 	   //Invert column values
215
-	    // alter options in wfdownloads_cat
216
-        $table = new WfdownloadsTable('wfdownloads_cat');
217
-        $table->addAlteredField('nohtml', "dohtml tinyint(1) NOT NULL DEFAULT '1'");
218
-        $table->addAlteredField('nosmiley', "dosmiley tinyint(1) NOT NULL DEFAULT '1'");
219
-        $table->addAlteredField('noxcodes', "doxcode tinyint(1) NOT NULL DEFAULT '1'");
220
-        $table->addAlteredField('noimages', "doimage tinyint(1) NOT NULL DEFAULT '1'");
221
-        $table->addAlteredField('nobreak', "dobr tinyint(1) NOT NULL DEFAULT '1'");
215
+		// alter options in wfdownloads_cat
216
+		$table = new WfdownloadsTable('wfdownloads_cat');
217
+		$table->addAlteredField('nohtml', "dohtml tinyint(1) NOT NULL DEFAULT '1'");
218
+		$table->addAlteredField('nosmiley', "dosmiley tinyint(1) NOT NULL DEFAULT '1'");
219
+		$table->addAlteredField('noxcodes', "doxcode tinyint(1) NOT NULL DEFAULT '1'");
220
+		$table->addAlteredField('noimages', "doimage tinyint(1) NOT NULL DEFAULT '1'");
221
+		$table->addAlteredField('nobreak', "dobr tinyint(1) NOT NULL DEFAULT '1'");
222 222
 
223
-        //inverting values no=1 <=> do=0
224
-        // have to store teporarly as value = 2 to
225
-        // avoid putting everithing to same value
226
-        // if you change 1 to 0, then 0 to one,
227
-        // every value will be 1, follow me?
228
-        $table->addUpdatedWhere('dohtml', 2,'=1');
229
-        $table->addUpdatedWhere('dohtml', 1,'=0');
223
+		//inverting values no=1 <=> do=0
224
+		// have to store teporarly as value = 2 to
225
+		// avoid putting everithing to same value
226
+		// if you change 1 to 0, then 0 to one,
227
+		// every value will be 1, follow me?
228
+		$table->addUpdatedWhere('dohtml', 2,'=1');
229
+		$table->addUpdatedWhere('dohtml', 1,'=0');
230 230
 		$table->addUpdatedWhere('dohtml', 0,'=2');
231 231
 
232 232
 		$table->addUpdatedWhere('dosmiley', 2,'=1');
@@ -254,22 +254,22 @@  discard block
 block discarded – undo
254 254
  * @return void
255 255
  */
256 256
 function update_table($new_fields, $existing_fields, &$table) {
257
-    foreach ($new_fields as $field => $fieldinfo) {
258
-	    $type = $fieldinfo["Type"];
259
-	    if (!in_array($field, array_keys($existing_fields) ) ) {
260
-	       //Add field as it is missing
261
-	       $table->addNewField($field, $type);
262
-	       //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type);
263
-	       //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br />";
257
+	foreach ($new_fields as $field => $fieldinfo) {
258
+		$type = $fieldinfo["Type"];
259
+		if (!in_array($field, array_keys($existing_fields) ) ) {
260
+		   //Add field as it is missing
261
+		   $table->addNewField($field, $type);
262
+		   //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type);
263
+		   //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br />";
264 264
 	   }
265 265
 	   elseif ($existing_fields[$field] != $type) {
266
-	       $table->addAlteredField($field, $field." ".$type);
267
-	       // check $fields[$field]['type'] for things like "int(10) unsigned"
268
-	       //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type);
269
-	       //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br />";
266
+		   $table->addAlteredField($field, $field." ".$type);
267
+		   // check $fields[$field]['type'] for things like "int(10) unsigned"
268
+		   //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type);
269
+		   //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br />";
270 270
 	   }
271 271
 	   else {
272
-	       //echo $field." <FONT COLOR='#0033FF'>Uptodate</FONT><br />";
272
+		   //echo $field." <FONT COLOR='#0033FF'>Uptodate</FONT><br />";
273 273
 	   }
274 274
 	}
275 275
 }
@@ -283,19 +283,19 @@  discard block
 block discarded – undo
283 283
  * @return array
284 284
  */
285 285
 function get_table_info($table, $default_fields) {
286
-    global $xoopsDB;
286
+	global $xoopsDB;
287 287
 	$result = $xoopsDB->query("SHOW COLUMNS FROM ".$table);
288 288
 	while ($existing_field = $xoopsDB->fetchArray($result)) {
289
-	     $fields[$existing_field['Field']] = $existing_field['Type'];
290
-	     if ($existing_field['Null'] != "YES") {
291
-	         $fields[$existing_field['Field']] .= " NOT NULL";
292
-	     }
293
-	     if ($existing_field['Extra']) {
294
-	         $fields[$existing_field['Field']] .= " ".$existing_field['Extra'];
295
-	     }
296
-	     if ($default_fields[$existing_field['Field']]['Default']) {
297
-	         $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
298
-	     }
289
+		 $fields[$existing_field['Field']] = $existing_field['Type'];
290
+		 if ($existing_field['Null'] != "YES") {
291
+			 $fields[$existing_field['Field']] .= " NOT NULL";
292
+		 }
293
+		 if ($existing_field['Extra']) {
294
+			 $fields[$existing_field['Field']] .= " ".$existing_field['Extra'];
295
+		 }
296
+		 if ($default_fields[$existing_field['Field']]['Default']) {
297
+			 $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
298
+		 }
299 299
 	}
300 300
 	return $fields;
301 301
 }
@@ -310,59 +310,59 @@  discard block
 block discarded – undo
310 310
  * @return array
311 311
  */
312 312
 function rename_fields(&$table, $renamed_fields, &$fields, $new_fields) {
313
-    foreach (array_keys($fields) as $field) {
314
-	    if (in_array($field, array_keys($renamed_fields))) {
315
-	        $new_field_name = $renamed_fields[$field];
316
-	        $new_field_type = $new_fields[$new_field_name]["Type"];
317
-	        $table->addAltered($field, $new_field_name." ".$new_field_type);
318
-	        //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type);
319
-	        //echo $field." Renamed to ".$new_field_name."<br />";
320
-	        $fields[$new_field_name] = $new_field_type;
321
-	    }
313
+	foreach (array_keys($fields) as $field) {
314
+		if (in_array($field, array_keys($renamed_fields))) {
315
+			$new_field_name = $renamed_fields[$field];
316
+			$new_field_type = $new_fields[$new_field_name]["Type"];
317
+			$table->addAltered($field, $new_field_name." ".$new_field_type);
318
+			//$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type);
319
+			//echo $field." Renamed to ".$new_field_name."<br />";
320
+			$fields[$new_field_name] = $new_field_type;
321
+		}
322 322
 	}
323 323
 	//return $fields;
324 324
 }
325 325
 
326 326
 $op = isset($_REQUEST['op']) ? intval($_REQUEST['op']) : 0;
327 327
 switch ($op) {
328
-    case 1:
329
-        // Make sure that nohtml is properly changed to dohtml
330
-        invert_nohtm_dohtml_values();
331
-        // Ensure that the proper tables are present
332
-        update_tables_to_300();
333
-        // Import data from MyDownloads
334
-        import_mydownloads_to_wfdownloads();
335
-        break;
328
+	case 1:
329
+		// Make sure that nohtml is properly changed to dohtml
330
+		invert_nohtm_dohtml_values();
331
+		// Ensure that the proper tables are present
332
+		update_tables_to_300();
333
+		// Import data from MyDownloads
334
+		import_mydownloads_to_wfdownloads();
335
+		break;
336 336
 
337
-    case 2:
338
-        // Update WF-Downloads
339
-        $log = invert_nohtm_dohtml_values();
340
-        update_tables_to_300();
341
-        break;
337
+	case 2:
338
+		// Update WF-Downloads
339
+		$log = invert_nohtm_dohtml_values();
340
+		update_tables_to_300();
341
+		break;
342 342
 
343
-    default:
344
-        //ask what to do
345
-        include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
346
-        $form = new XoopsThemeForm('Upgrade WF-Downloads',"form", $_SERVER['REQUEST_URI']);
343
+	default:
344
+		//ask what to do
345
+		include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
346
+		$form = new XoopsThemeForm('Upgrade WF-Downloads',"form", $_SERVER['REQUEST_URI']);
347 347
 
348
-        //Is MyDownloads installed?
349
-        $module_handler = xoops_gethandler('module');
350
-        $mydownloadsModule = $module_handler->getByDirname("mydownloads");
351
-        if (is_object($mydownloadsModule)) {
352
-            $mydownloadsButton = new XoopsFormButton("Import data from MyDownloads", "myd_button", "Import", "submit");
353
-            $mydownloadsButton->setExtra("onclick='document.forms.form.op.value=\"1\"'");
354
-            $form->addElement($mydownloadsButton);
355
-        }
348
+		//Is MyDownloads installed?
349
+		$module_handler = xoops_gethandler('module');
350
+		$mydownloadsModule = $module_handler->getByDirname("mydownloads");
351
+		if (is_object($mydownloadsModule)) {
352
+			$mydownloadsButton = new XoopsFormButton("Import data from MyDownloads", "myd_button", "Import", "submit");
353
+			$mydownloadsButton->setExtra("onclick='document.forms.form.op.value=\"1\"'");
354
+			$form->addElement($mydownloadsButton);
355
+		}
356 356
 
357
-        if (!wfdownloads_TableExists('wfdownloads_meta')) {
358
-            $updateButton = new XoopsFormButton("Update WF-Downloads", "upd_button", "Update", "submit");
359
-            $updateButton->setExtra("onclick='document.forms.form.op.value=\"2\"'");
360
-            $form->addElement($updateButton);
361
-        }
357
+		if (!wfdownloads_TableExists('wfdownloads_meta')) {
358
+			$updateButton = new XoopsFormButton("Update WF-Downloads", "upd_button", "Update", "submit");
359
+			$updateButton->setExtra("onclick='document.forms.form.op.value=\"2\"'");
360
+			$form->addElement($updateButton);
361
+		}
362 362
 
363
-        $form->addElement(new XoopsFormHidden('op', 0));
364
-        $form->display();
365
-        break;
363
+		$form->addElement(new XoopsFormHidden('op', 0));
364
+		$form->display();
365
+		break;
366 366
 }
367 367
 //wfdownloads_modFooter();
368 368
 //xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	if (!wfdownloads_TableExists('wfdownloads_meta')) {
26 26
 	    // Create table wfdownloads_meta
27 27
         $table = new WfdownloadsTable('wfdownloads_meta');
28
-        $table->setStructure(	"CREATE TABLE %s (
28
+        $table->setStructure("CREATE TABLE %s (
29 29
         						metakey varchar(50) NOT NULL default '',
30 30
         						metavalue varchar(255) NOT NULL default '',
31 31
         						PRIMARY KEY (metakey))
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     $ret = array();
206 206
 	global $xoopsDB;
207 207
 	$cat_handler = xoops_getmodulehandler('category', 'wfdownloads');
208
-	$result = $xoopsDB->query("SHOW COLUMNS FROM ".$cat_handler->table);
208
+	$result = $xoopsDB->query("SHOW COLUMNS FROM " . $cat_handler->table);
209 209
 	while ($existing_field = $xoopsDB->fetchArray($result)) {
210 210
 	     $fields[$existing_field['field']] = $existing_field['type'];
211 211
 	}
@@ -225,21 +225,21 @@  discard block
 block discarded – undo
225 225
         // avoid putting everithing to same value
226 226
         // if you change 1 to 0, then 0 to one,
227 227
         // every value will be 1, follow me?
228
-        $table->addUpdatedWhere('dohtml', 2,'=1');
229
-        $table->addUpdatedWhere('dohtml', 1,'=0');
230
-		$table->addUpdatedWhere('dohtml', 0,'=2');
228
+        $table->addUpdatedWhere('dohtml', 2, '=1');
229
+        $table->addUpdatedWhere('dohtml', 1, '=0');
230
+		$table->addUpdatedWhere('dohtml', 0, '=2');
231 231
 
232
-		$table->addUpdatedWhere('dosmiley', 2,'=1');
233
-		$table->addUpdatedWhere('dosmiley', 1,'=0');
234
-		$table->addUpdatedWhere('dosmiley', 0,'=2');
232
+		$table->addUpdatedWhere('dosmiley', 2, '=1');
233
+		$table->addUpdatedWhere('dosmiley', 1, '=0');
234
+		$table->addUpdatedWhere('dosmiley', 0, '=2');
235 235
 
236
-		$table->addUpdatedWhere('doxcode', 2,'=1');
237
-		$table->addUpdatedWhere('doxcode', 1,'=0');
238
-		$table->addUpdatedWhere('doxcode', 0,'=2');
236
+		$table->addUpdatedWhere('doxcode', 2, '=1');
237
+		$table->addUpdatedWhere('doxcode', 1, '=0');
238
+		$table->addUpdatedWhere('doxcode', 0, '=2');
239 239
 
240
-		$table->addUpdatedWhere('doimage', 2,'=1');
241
-		$table->addUpdatedWhere('doimage', 1,'=0');
242
-		$table->addUpdatedWhere('doimage', 0,'=2');
240
+		$table->addUpdatedWhere('doimage', 2, '=1');
241
+		$table->addUpdatedWhere('doimage', 1, '=0');
242
+		$table->addUpdatedWhere('doimage', 0, '=2');
243 243
 		$ret = $dbupdater->updateTable($table);
244 244
 	}
245 245
 	return $ret;
@@ -256,14 +256,14 @@  discard block
 block discarded – undo
256 256
 function update_table($new_fields, $existing_fields, &$table) {
257 257
     foreach ($new_fields as $field => $fieldinfo) {
258 258
 	    $type = $fieldinfo["Type"];
259
-	    if (!in_array($field, array_keys($existing_fields) ) ) {
259
+	    if (!in_array($field, array_keys($existing_fields))) {
260 260
 	       //Add field as it is missing
261 261
 	       $table->addNewField($field, $type);
262 262
 	       //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type);
263 263
 	       //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br />";
264 264
 	   }
265 265
 	   elseif ($existing_fields[$field] != $type) {
266
-	       $table->addAlteredField($field, $field." ".$type);
266
+	       $table->addAlteredField($field, $field . " " . $type);
267 267
 	       // check $fields[$field]['type'] for things like "int(10) unsigned"
268 268
 	       //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type);
269 269
 	       //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br />";
@@ -284,17 +284,17 @@  discard block
 block discarded – undo
284 284
  */
285 285
 function get_table_info($table, $default_fields) {
286 286
     global $xoopsDB;
287
-	$result = $xoopsDB->query("SHOW COLUMNS FROM ".$table);
287
+	$result = $xoopsDB->query("SHOW COLUMNS FROM " . $table);
288 288
 	while ($existing_field = $xoopsDB->fetchArray($result)) {
289 289
 	     $fields[$existing_field['Field']] = $existing_field['Type'];
290 290
 	     if ($existing_field['Null'] != "YES") {
291 291
 	         $fields[$existing_field['Field']] .= " NOT NULL";
292 292
 	     }
293 293
 	     if ($existing_field['Extra']) {
294
-	         $fields[$existing_field['Field']] .= " ".$existing_field['Extra'];
294
+	         $fields[$existing_field['Field']] .= " " . $existing_field['Extra'];
295 295
 	     }
296 296
 	     if ($default_fields[$existing_field['Field']]['Default']) {
297
-	         $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
297
+	         $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'";
298 298
 	     }
299 299
 	}
300 300
 	return $fields;
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 	    if (in_array($field, array_keys($renamed_fields))) {
315 315
 	        $new_field_name = $renamed_fields[$field];
316 316
 	        $new_field_type = $new_fields[$new_field_name]["Type"];
317
-	        $table->addAltered($field, $new_field_name." ".$new_field_type);
317
+	        $table->addAltered($field, $new_field_name . " " . $new_field_type);
318 318
 	        //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type);
319 319
 	        //echo $field." Renamed to ".$new_field_name."<br />";
320 320
 	        $fields[$new_field_name] = $new_field_type;
@@ -342,8 +342,8 @@  discard block
 block discarded – undo
342 342
 
343 343
     default:
344 344
         //ask what to do
345
-        include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
346
-        $form = new XoopsThemeForm('Upgrade WF-Downloads',"form", $_SERVER['REQUEST_URI']);
345
+        include XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
346
+        $form = new XoopsThemeForm('Upgrade WF-Downloads', "form", $_SERVER['REQUEST_URI']);
347 347
 
348 348
         //Is MyDownloads installed?
349 349
         $module_handler = xoops_gethandler('module');
Please login to merge, or discard this patch.
admin/rating.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -70,21 +70,21 @@  discard block
 block discarded – undo
70 70
 		$ratingid = isset($_GET['ratingid']) ? intval($_GET['ratingid']) : 0 ;
71 71
 
72 72
 		smart_xoops_cp_header();
73
-        echo $indexAdmin->addNavigation('rating.php');
73
+		echo $indexAdmin->addNavigation('rating.php');
74 74
 
75 75
 		editclass(true, $ratingid);
76 76
 		break;
77 77
 
78 78
 	case "addrating":
79
-        include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
80
-        $controller = new SmartObjectController($smartobject_rating_handler);
79
+		include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
80
+		$controller = new SmartObjectController($smartobject_rating_handler);
81 81
 		$controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php');
82 82
 
83 83
 		break;
84 84
 
85 85
 	case "del":
86
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
87
-        $controller = new SmartObjectController($smartobject_rating_handler);
86
+		include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
87
+		$controller = new SmartObjectController($smartobject_rating_handler);
88 88
 		$controller->handleObjectDeletion();
89 89
 
90 90
 		break;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	default:
93 93
 
94 94
 		smart_xoops_cp_header();
95
-        echo $indexAdmin->addNavigation('rating.php');
95
+		echo $indexAdmin->addNavigation('rating.php');
96 96
 
97 97
 		//smart_adminMenu(4, _AM_SOBJECT_RATINGS);
98 98
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 	$ratingObj = $smartobject_rating_handler->get($ratingid);
15 15
 
16
-	if (!$ratingObj->isNew()){
16
+	if (!$ratingObj->isNew()) {
17 17
 
18 18
 		if ($showmenu) {
19 19
 			//smart_adminMenu(4, _AM_SOBJECT_RATINGS . " > " . _AM_SOBJECT_EDITING);
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 			$controller->postDataToObject($ratingObj);
32 32
 
33 33
 			if ($_POST['op'] == 'changedField') {
34
-				switch($_POST['changedField']) {
34
+				switch ($_POST['changedField']) {
35 35
 					case 'dirname' :
36 36
 						$ratingObj->showFieldOnForm(array('item', 'itemid', 'uid', 'date', 'rate'));
37 37
 					break;
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 }
54 54
 
55 55
 include_once("admin_header.php");
56
-include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
57
-include_once SMARTOBJECT_ROOT_PATH."class/rating.php";
56
+include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
57
+include_once SMARTOBJECT_ROOT_PATH . "class/rating.php";
58 58
 $smartobject_rating_handler = xoops_getmodulehandler('rating');
59 59
 $indexAdmin = new ModuleAdmin();
60 60
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	case "mod":
68 68
 	case "changedField";
69 69
 
70
-		$ratingid = isset($_GET['ratingid']) ? intval($_GET['ratingid']) : 0 ;
70
+		$ratingid = isset($_GET['ratingid']) ? intval($_GET['ratingid']) : 0;
71 71
 
72 72
 		smart_xoops_cp_header();
73 73
         echo $indexAdmin->addNavigation('rating.php');
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
 		break;
77 77
 
78 78
 	case "addrating":
79
-        include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
79
+        include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
80 80
         $controller = new SmartObjectController($smartobject_rating_handler);
81 81
 		$controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php');
82 82
 
83 83
 		break;
84 84
 
85 85
 	case "del":
86
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
86
+	    include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
87 87
         $controller = new SmartObjectController($smartobject_rating_handler);
88 88
 		$controller->handleObjectDeletion();
89 89
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 		smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC);
100 100
 
101
-		include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
101
+		include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
102 102
 		$objectTable = new SmartObjectTable($smartobject_rating_handler);
103 103
 		$objectTable->addColumn(new SmartObjectColumn('name', 'left'));
104 104
 		$objectTable->addColumn(new SmartObjectColumn('dirname', 'left'));
Please login to merge, or discard this patch.
admin/menu.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 
22 22
 if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) {
23
-    $fileinc = $pathLanguage . '/language/english/main.php';
23
+	$fileinc = $pathLanguage . '/language/english/main.php';
24 24
 }
25 25
 
26 26
 include_once $fileinc;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	$i++;
72 72
 	$adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES;
73 73
 	$adminmenu[$i]['link'] = "admin/currency.php";
74
-    $adminmenu[$i]["icon"]  = $pathIcon32 . '/cash_stack.png';
74
+	$adminmenu[$i]["icon"]  = $pathIcon32 . '/cash_stack.png';
75 75
 }
76 76
 
77 77
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 include_once $fileinc;
27 27
 
28 28
 $adminmenu = array();
29
-$i=0;
29
+$i = 0;
30 30
 $adminmenu[$i]["title"] = _AM_MODULEADMIN_HOME;
31 31
 $adminmenu[$i]['link'] = "admin/index.php";
32 32
 $adminmenu[$i]["icon"]  = $pathIcon32 . '/home.png';
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	$i++;
72 72
 	$adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES;
73 73
 	$adminmenu[$i]['link'] = "admin/currency.php";
74
-    $adminmenu[$i]["icon"]  = $pathIcon32 . '/cash_stack.png';
74
+    $adminmenu[$i]["icon"] = $pathIcon32 . '/cash_stack.png';
75 75
 }
76 76
 
77 77
 
@@ -81,24 +81,24 @@  discard block
 block discarded – undo
81 81
 
82 82
 // --- for XCL ---	
83 83
 //	$headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&amp;op=showmod&amp;mod=' . $xoopsModule->getVar('mid');
84
-	$mid = $xoopsModule->getVar('mid') ;
85
-	if ( defined( 'XOOPS_CUBE_LEGACY' ) ) {
86
-		$link_pref = XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id='.$mid; 
84
+	$mid = $xoopsModule->getVar('mid');
85
+	if (defined('XOOPS_CUBE_LEGACY')) {
86
+		$link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; 
87 87
 	} else {
88
-		$link_pref = XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$mid ;
88
+		$link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid;
89 89
 	}
90
-	$headermenu[$i]['link'] = $link_pref ;
90
+	$headermenu[$i]['link'] = $link_pref;
91 91
 // -----
92 92
 
93 93
 // --- for XCL ---	
94 94
 //	$headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname');
95
-	$dirname = $xoopsModule->getVar('dirname') ;
96
-	if ( defined( 'XOOPS_CUBE_LEGACY' ) ) {
97
-		$link_module = XOOPS_URL.'/modules/legacy/admin/index.php?action=ModuleUpdate&dirname='.$dirname;
95
+	$dirname = $xoopsModule->getVar('dirname');
96
+	if (defined('XOOPS_CUBE_LEGACY')) {
97
+		$link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname;
98 98
 	} else {
99
-		$link_module = XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module='.$dirname;
99
+		$link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname;
100 100
 	}
101
-	$headermenu[$i]['link'] = $link_module ;
101
+	$headermenu[$i]['link'] = $link_module;
102 102
 // -----
103 103
 
104 104
 	$i++;
Please login to merge, or discard this patch.
admin/link.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 switch ($op) {
27 27
 
28 28
 	case "del":
29
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
30
-        $controller = new SmartObjectController($smartobject_link_handler);
29
+		include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
30
+		$controller = new SmartObjectController($smartobject_link_handler);
31 31
 		$controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM);
32 32
 
33 33
 		break;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 		smart_xoops_cp_header();
70 70
 
71
-        echo $indexAdmin->addNavigation('link.php');
71
+		echo $indexAdmin->addNavigation('link.php');
72 72
 
73 73
 
74 74
 		//smart_adminMenu(1, _AM_SOBJECT_SENT_LINKS);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 */
13 13
 
14 14
 include_once("admin_header.php");
15
-include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
16
-include_once SMARTOBJECT_ROOT_PATH."class/smartobjectlink.php";
15
+include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
16
+include_once SMARTOBJECT_ROOT_PATH . "class/smartobjectlink.php";
17 17
 $indexAdmin = new ModuleAdmin();
18 18
 
19 19
 $smartobject_link_handler = xoops_getmodulehandler('link');
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 switch ($op) {
27 27
 
28 28
 	case "del":
29
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
29
+	    include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
30 30
         $controller = new SmartObjectController($smartobject_link_handler);
31 31
 		$controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM);
32 32
 
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
 // ---
52 52
 // 2012-01-01 PHP 5.3 : Assigning the return value of new by reference is now deprecated.
53 53
 //		$xoopsTpl =& new XoopsTpl();
54
-		$xoopsTpl =  new XoopsTpl();
54
+		$xoopsTpl = new XoopsTpl();
55 55
 //---
56 56
 
57 57
 		$xoopsTpl->assign('link', $linkObj->toArray());
58
-		$xoopsTpl->display( 'db:smartobject_sentlink_display.html' );
58
+		$xoopsTpl->display('db:smartobject_sentlink_display.html');
59 59
 
60 60
 		echo "<br />";
61 61
 		smart_close_collapsable('sentlinks');
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
 
76 76
 		smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO);
77 77
 
78
-		include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
78
+		include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
79 79
 		$objectTable = new SmartObjectTable($smartobject_link_handler, null, array('delete'));
80 80
 		$objectTable->addColumn(new SmartObjectColumn('date'));
81
-		$objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align='left', $width=false, 'getFromInfo'));
82
-		$objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align='left', $width=false, 'getToInfo'));
81
+		$objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo'));
82
+		$objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo'));
83 83
 		$objectTable->addColumn(new SmartObjectColumn('link'));
84 84
 
85 85
 		$objectTable->addCustomAction("getViewItemLink");
Please login to merge, or discard this patch.
admin/admin_header.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
42 42
 
43 43
 if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
44
-        include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
45
-    }else{
46
-        redirect_header("../../../admin.php", 5, _AM_BIRTHDAY_MODULEADMIN_MISSING, false);
47
-    }
48 44
\ No newline at end of file
45
+		include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
46
+	}else{
47
+		redirect_header("../../../admin.php", 5, _AM_BIRTHDAY_MODULEADMIN_MISSING, false);
48
+	}
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
 xoops_loadLanguage('modinfo', $thisModuleDir);
37 37
 xoops_loadLanguage('main', $thisModuleDir);
38 38
 
39
-$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
40
-$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
39
+$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
40
+$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
41 41
 $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
42 42
 
43
-if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
44
-        include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
45
-    }else{
43
+if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) {
44
+        include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php');
45
+    } else {
46 46
         redirect_header("../../../admin.php", 5, _AM_BIRTHDAY_MODULEADMIN_MISSING, false);
47 47
     }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
admin/adsense.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$adsenseid = isset($_GET['adsenseid']) ? intval($_GET['adsenseid']) : 0 ;
57 57
 
58 58
 		smart_xoops_cp_header();
59
-        echo $indexAdmin->addNavigation('adsense.php');
59
+		echo $indexAdmin->addNavigation('adsense.php');
60 60
 
61 61
 		editclass(true, $adsenseid);
62 62
 		break;
@@ -66,28 +66,28 @@  discard block
 block discarded – undo
66 66
 		$adsenseid = isset($_GET['adsenseid']) ? intval($_GET['adsenseid']) : 0 ;
67 67
 
68 68
 		smart_xoops_cp_header();
69
-        echo $indexAdmin->addNavigation('adsense.php');
69
+		echo $indexAdmin->addNavigation('adsense.php');
70 70
 
71 71
 		editclass(true, $adsenseid, true);
72 72
 		break;
73 73
 
74 74
 	case "addadsense":
75
-	    if(@include_once SMARTOBJECT_ROOT_PATH . "include/captcha/captcha.php") {
76
- 	    	$xoopsCaptcha = XoopsCaptcha::instance();
77
-	 	    if(! $xoopsCaptcha->verify() ) {
78
-	 		    redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage());
79
-	 		    exit;
80
-	 	    }
75
+		if(@include_once SMARTOBJECT_ROOT_PATH . "include/captcha/captcha.php") {
76
+ 			$xoopsCaptcha = XoopsCaptcha::instance();
77
+	 		if(! $xoopsCaptcha->verify() ) {
78
+	 			redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage());
79
+	 			exit;
80
+	 		}
81 81
 		}
82
-        include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
83
-        $controller = new SmartObjectController($smartobject_adsense_handler);
82
+		include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
83
+		$controller = new SmartObjectController($smartobject_adsense_handler);
84 84
 		$controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED);
85 85
 		break;
86 86
 
87 87
 	case "del":
88 88
 
89
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
90
-        $controller = new SmartObjectController($smartobject_adsense_handler);
89
+		include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
90
+		$controller = new SmartObjectController($smartobject_adsense_handler);
91 91
 		$controller->handleObjectDeletion();
92 92
 
93 93
 		break;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	default:
96 96
 
97 97
 		smart_xoops_cp_header();
98
-        echo $indexAdmin->addNavigation('adsense.php');
98
+		echo $indexAdmin->addNavigation('adsense.php');
99 99
 
100 100
 		//smart_adminMenu(3, _AM_SOBJECT_ADSENSES);
101 101
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 * Licence: GNU
8 8
 */
9 9
 
10
-function editclass($showmenu = false, $adsenseid = 0, $clone=false)
10
+function editclass($showmenu = false, $adsenseid = 0, $clone = false)
11 11
 {
12 12
 	global $smartobject_adsense_handler;
13 13
 
14 14
 	$adsenseObj = $smartobject_adsense_handler->get($adsenseid);
15 15
 
16
-	if (!$clone && !$adsenseObj->isNew()){
16
+	if (!$clone && !$adsenseObj->isNew()) {
17 17
 
18 18
 		if ($showmenu) {
19 19
 			//smart_adminMenu(3, _AM_SOBJECT_ADSENSES . " > " . _AM_SOBJECT_EDITING);
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 }
40 40
 
41 41
 include_once("admin_header.php");
42
-include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
43
-include_once SMARTOBJECT_ROOT_PATH."class/adsense.php";
42
+include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
43
+include_once SMARTOBJECT_ROOT_PATH . "class/adsense.php";
44 44
 $smartobject_adsense_handler = xoops_getmodulehandler('adsense');
45 45
 smart_loadLanguageFile('smartobject', 'adsense');
46 46
 $indexAdmin = new ModuleAdmin();
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 switch ($op) {
54 54
 	case "mod":
55 55
 
56
-		$adsenseid = isset($_GET['adsenseid']) ? intval($_GET['adsenseid']) : 0 ;
56
+		$adsenseid = isset($_GET['adsenseid']) ? intval($_GET['adsenseid']) : 0;
57 57
 
58 58
 		smart_xoops_cp_header();
59 59
         echo $indexAdmin->addNavigation('adsense.php');
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 	case "clone":
65 65
 
66
-		$adsenseid = isset($_GET['adsenseid']) ? intval($_GET['adsenseid']) : 0 ;
66
+		$adsenseid = isset($_GET['adsenseid']) ? intval($_GET['adsenseid']) : 0;
67 67
 
68 68
 		smart_xoops_cp_header();
69 69
         echo $indexAdmin->addNavigation('adsense.php');
@@ -72,21 +72,21 @@  discard block
 block discarded – undo
72 72
 		break;
73 73
 
74 74
 	case "addadsense":
75
-	    if(@include_once SMARTOBJECT_ROOT_PATH . "include/captcha/captcha.php") {
75
+	    if (@include_once SMARTOBJECT_ROOT_PATH . "include/captcha/captcha.php") {
76 76
  	    	$xoopsCaptcha = XoopsCaptcha::instance();
77
-	 	    if(! $xoopsCaptcha->verify() ) {
77
+	 	    if (!$xoopsCaptcha->verify()) {
78 78
 	 		    redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage());
79 79
 	 		    exit;
80 80
 	 	    }
81 81
 		}
82
-        include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
82
+        include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
83 83
         $controller = new SmartObjectController($smartobject_adsense_handler);
84 84
 		$controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED);
85 85
 		break;
86 86
 
87 87
 	case "del":
88 88
 
89
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
89
+	    include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
90 90
         $controller = new SmartObjectController($smartobject_adsense_handler);
91 91
 		$controller->handleObjectDeletion();
92 92
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 		smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC);
103 103
 
104
-		include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
104
+		include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
105 105
 		$objectTable = new SmartObjectTable($smartobject_adsense_handler);
106 106
 		$objectTable->addColumn(new SmartObjectColumn('description', 'left'));
107 107
 		$objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode'));
Please login to merge, or discard this patch.
admin/currency.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,15 +85,15 @@
 block discarded – undo
85 85
 		break;
86 86
 
87 87
 	case "addcurrency":
88
-        include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
89
-        $controller = new SmartObjectController($smartobject_currency_handler);
88
+		include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
89
+		$controller = new SmartObjectController($smartobject_currency_handler);
90 90
 		$controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php');
91 91
 
92 92
 		break;
93 93
 
94 94
 	case "del":
95
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
96
-        $controller = new SmartObjectController($smartobject_currency_handler);
95
+		include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
96
+		$controller = new SmartObjectController($smartobject_currency_handler);
97 97
 		$controller->handleObjectDeletion();
98 98
 
99 99
 		break;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 	$currencyObj = $smartobject_currency_handler->get($currencyid);
15 15
 
16
-	if (!$currencyObj->isNew()){
16
+	if (!$currencyObj->isNew()) {
17 17
 
18 18
 		if ($showmenu) {
19 19
 			//smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _AM_SOBJECT_EDITING);
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 }
37 37
 
38 38
 include_once("admin_header.php");
39
-include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
40
-include_once SMARTOBJECT_ROOT_PATH."class/currency.php";
39
+include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
40
+include_once SMARTOBJECT_ROOT_PATH . "class/currency.php";
41 41
 $smartobject_currency_handler = xoops_getmodulehandler('currency');
42 42
 
43 43
 $op = '';
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 switch ($op) {
49 49
 	case "mod":
50
-		$currencyid = isset($_GET['currencyid']) ? intval($_GET['currencyid']) : 0 ;
50
+		$currencyid = isset($_GET['currencyid']) ? intval($_GET['currencyid']) : 0;
51 51
 
52 52
 		smart_xoops_cp_header();
53 53
 
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
 		break;
86 86
 
87 87
 	case "addcurrency":
88
-        include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
88
+        include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
89 89
         $controller = new SmartObjectController($smartobject_currency_handler);
90 90
 		$controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php');
91 91
 
92 92
 		break;
93 93
 
94 94
 	case "del":
95
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
95
+	    include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
96 96
         $controller = new SmartObjectController($smartobject_currency_handler);
97 97
 		$controller->handleObjectDeletion();
98 98
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 		smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC);
108 108
 
109
-		include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
109
+		include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
110 110
 		$objectTable = new SmartObjectTable($smartobject_currency_handler);
111 111
 		$objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink'));
112 112
 		$objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150));
Please login to merge, or discard this patch.
admin/tag.php 2 patches
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -9,45 +9,45 @@  discard block
 block discarded – undo
9 9
 
10 10
 function edittag($tagid = 0, $language=false, $fct=false)
11 11
 {
12
-    global $smartobject_tag_handler;
13
-
14
-    $tagObj = $smartobject_tag_handler->get($tagid);
15
-
16
-    if ($tagObj->isNew()){
17
-    	$breadcrumb = _AM_SOBJECT_TAGS . " > " . _AM_SOBJECT_TAG_CREATE;
18
-    	$title = _AM_SOBJECT_TAG_CREATE;
19
-    	$info = _AM_SOBJECT_TAG_CREATE_INFO;
20
-    	$collaps_name = 'tagcreate';
21
-    	$form_name = _AM_SOBJECT_TAG_CREATE;
22
-    	$submit_button_caption = null;
23
-    	//$tagObj->stripMultilanguageFields();
24
-    } else {
25
-    	if ($language) {
26
-	    	$breadcrumb = _AM_SOBJECT_TAGS . " > " . _AM_SOBJECT_TAG_EDITING_LANGUAGE;
27
-	    	$title = _AM_SOBJECT_TAG_EDIT_LANGUAGE;
28
-	    	$info = _AM_SOBJECT_TAG_EDIT_LANGUAGE_INFO;
29
-	    	$collaps_name = 'tageditlanguage';
30
-	    	$form_name = _AM_SOBJECT_TAG_EDIT_LANGUAGE;
31
-	    	$submit_button_caption = null;
32
-	    	$tagObj->makeNonMLFieldReadOnly();
33
-    	} else {
34
-	    	$breadcrumb = _AM_SOBJECT_TAGS . " > " . _AM_SOBJECT_EDITING;
35
-	    	$title = _AM_SOBJECT_TAG_EDIT;
36
-	    	$info = _AM_SOBJECT_TAG_EDIT_INFO;
37
-	    	$collaps_name = 'tagedit';
38
-	    	$form_name = _AM_SOBJECT_TAG_EDIT;
39
-	    	$submit_button_caption = null;
40
-    		$tagObj->stripMultilanguageFields();
41
-    	}
42
-    }
43
-
44
-    //smart_adminMenu(2, $breadcrumb);
45
-
46
-    smart_collapsableBar($collaps_name, $title, $info);
47
-
48
-    $sform = $tagObj->getForm($form_name, 'addtag', false,  $submit_button_caption);
49
-    $sform->display();
50
-    smart_close_collapsable($collaps_name);
12
+	global $smartobject_tag_handler;
13
+
14
+	$tagObj = $smartobject_tag_handler->get($tagid);
15
+
16
+	if ($tagObj->isNew()){
17
+		$breadcrumb = _AM_SOBJECT_TAGS . " > " . _AM_SOBJECT_TAG_CREATE;
18
+		$title = _AM_SOBJECT_TAG_CREATE;
19
+		$info = _AM_SOBJECT_TAG_CREATE_INFO;
20
+		$collaps_name = 'tagcreate';
21
+		$form_name = _AM_SOBJECT_TAG_CREATE;
22
+		$submit_button_caption = null;
23
+		//$tagObj->stripMultilanguageFields();
24
+	} else {
25
+		if ($language) {
26
+			$breadcrumb = _AM_SOBJECT_TAGS . " > " . _AM_SOBJECT_TAG_EDITING_LANGUAGE;
27
+			$title = _AM_SOBJECT_TAG_EDIT_LANGUAGE;
28
+			$info = _AM_SOBJECT_TAG_EDIT_LANGUAGE_INFO;
29
+			$collaps_name = 'tageditlanguage';
30
+			$form_name = _AM_SOBJECT_TAG_EDIT_LANGUAGE;
31
+			$submit_button_caption = null;
32
+			$tagObj->makeNonMLFieldReadOnly();
33
+		} else {
34
+			$breadcrumb = _AM_SOBJECT_TAGS . " > " . _AM_SOBJECT_EDITING;
35
+			$title = _AM_SOBJECT_TAG_EDIT;
36
+			$info = _AM_SOBJECT_TAG_EDIT_INFO;
37
+			$collaps_name = 'tagedit';
38
+			$form_name = _AM_SOBJECT_TAG_EDIT;
39
+			$submit_button_caption = null;
40
+			$tagObj->stripMultilanguageFields();
41
+		}
42
+	}
43
+
44
+	//smart_adminMenu(2, $breadcrumb);
45
+
46
+	smart_collapsableBar($collaps_name, $title, $info);
47
+
48
+	$sform = $tagObj->getForm($form_name, 'addtag', false,  $submit_button_caption);
49
+	$sform->display();
50
+	smart_close_collapsable($collaps_name);
51 51
 }
52 52
 
53 53
 include_once("admin_header.php");
@@ -68,33 +68,33 @@  discard block
 block discarded – undo
68 68
 switch ($op) {
69 69
 
70 70
 	case "del":
71
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
72
-        $controller = new SmartObjectController($smartobject_tag_handler);
71
+		include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
72
+		$controller = new SmartObjectController($smartobject_tag_handler);
73 73
 		$controller->handleObjectDeletion(_AM_SOBJECT_TAG_DELETE_CONFIRM);
74 74
 
75 75
 		break;
76 76
 
77
-    case "addtag":
78
-        include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
79
-        $controller = new SmartObjectController($smartobject_tag_handler);
80
-        $tagObj = $controller->storeSmartObject();
81
-        if ($tagObj->hasError()) {
82
-        	redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
83
-        	exit;
84
-        }
85
-
86
-        if ($tagObj->hasError()) {
87
-        	redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
88
-        } else {
89
-        	redirect_header(smart_get_page_before_form(), 3, _CO_SOBJECT_SAVE_SUCCESS);
90
-        }
77
+	case "addtag":
78
+		include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
79
+		$controller = new SmartObjectController($smartobject_tag_handler);
80
+		$tagObj = $controller->storeSmartObject();
81
+		if ($tagObj->hasError()) {
82
+			redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
83
+			exit;
84
+		}
85
+
86
+		if ($tagObj->hasError()) {
87
+			redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
88
+		} else {
89
+			redirect_header(smart_get_page_before_form(), 3, _CO_SOBJECT_SAVE_SUCCESS);
90
+		}
91 91
 		exit;
92
-        break;
92
+		break;
93 93
 
94
-    case "mod":
95
-        smart_xoops_cp_header();
96
-        edittag($tagid, $language, $fct);
97
-        break;
94
+	case "mod":
95
+		smart_xoops_cp_header();
96
+		edittag($tagid, $language, $fct);
97
+		break;
98 98
 
99 99
 	default:
100 100
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 * Licence: GNU
8 8
 */
9 9
 
10
-function edittag($tagid = 0, $language=false, $fct=false)
10
+function edittag($tagid = 0, $language = false, $fct = false)
11 11
 {
12 12
     global $smartobject_tag_handler;
13 13
 
14 14
     $tagObj = $smartobject_tag_handler->get($tagid);
15 15
 
16
-    if ($tagObj->isNew()){
16
+    if ($tagObj->isNew()) {
17 17
     	$breadcrumb = _AM_SOBJECT_TAGS . " > " . _AM_SOBJECT_TAG_CREATE;
18 18
     	$title = _AM_SOBJECT_TAG_CREATE;
19 19
     	$info = _AM_SOBJECT_TAG_CREATE_INFO;
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
 
46 46
     smart_collapsableBar($collaps_name, $title, $info);
47 47
 
48
-    $sform = $tagObj->getForm($form_name, 'addtag', false,  $submit_button_caption);
48
+    $sform = $tagObj->getForm($form_name, 'addtag', false, $submit_button_caption);
49 49
     $sform->display();
50 50
     smart_close_collapsable($collaps_name);
51 51
 }
52 52
 
53 53
 include_once("admin_header.php");
54
-include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
55
-include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttag.php";
54
+include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
55
+include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttag.php";
56 56
 
57 57
 $smartobject_tag_handler = xoops_getmodulehandler('tag');
58 58
 
@@ -61,21 +61,21 @@  discard block
 block discarded – undo
61 61
 if (isset($_GET['op'])) $op = $_GET['op'];
62 62
 if (isset($_POST['op'])) $op = $_POST['op'];
63 63
 
64
-$tagid = isset($_GET['tagid']) ? $_GET['tagid'] : 0 ;
65
-$fct = isset($_GET['fct']) ? $_GET['fct'] :'' ;
66
-$language = isset($_GET['language']) ? $_GET['language'] : false ;
64
+$tagid = isset($_GET['tagid']) ? $_GET['tagid'] : 0;
65
+$fct = isset($_GET['fct']) ? $_GET['fct'] : '';
66
+$language = isset($_GET['language']) ? $_GET['language'] : false;
67 67
 
68 68
 switch ($op) {
69 69
 
70 70
 	case "del":
71
-	    include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
71
+	    include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
72 72
         $controller = new SmartObjectController($smartobject_tag_handler);
73 73
 		$controller->handleObjectDeletion(_AM_SOBJECT_TAG_DELETE_CONFIRM);
74 74
 
75 75
 		break;
76 76
 
77 77
     case "addtag":
78
-        include_once XOOPS_ROOT_PATH."/modules/smartobject/class/smartobjectcontroller.php";
78
+        include_once XOOPS_ROOT_PATH . "/modules/smartobject/class/smartobjectcontroller.php";
79 79
         $controller = new SmartObjectController($smartobject_tag_handler);
80 80
         $tagObj = $controller->storeSmartObject();
81 81
         if ($tagObj->hasError()) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 		smart_collapsableBar('tags', _AM_SOBJECT_TAGS, _AM_SOBJECT_TAGS_INFO);
106 106
 
107
-		include_once SMARTOBJECT_ROOT_PATH."class/smartobjecttable.php";
107
+		include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
108 108
 		$objectTable = new SmartObjectTable($smartobject_tag_handler, false, array('delete'));
109 109
 		$objectTable->addColumn(new SmartObjectColumn('name'));
110 110
 		$objectTable->addColumn(new SmartObjectColumn('language'));
Please login to merge, or discard this patch.
admin/index.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
 	$indexAdmin = new ModuleAdmin();
28 28
 
29
-    echo $indexAdmin->addNavigation('index.php');
30
-    echo $indexAdmin->renderIndex();
29
+	echo $indexAdmin->addNavigation('index.php');
30
+	echo $indexAdmin->renderIndex();
31 31
 
32 32
 include "admin_footer.php";
33 33
\ No newline at end of file
Please login to merge, or discard this patch.