Completed
Push — master ( c92e39...c677ea )
by Michael
02:38
created
class/category.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -333,10 +333,10 @@  discard block
 block discarded – undo
333 333
 
334 334
         if ($category->isNew()) {
335 335
             $sql = sprintf('INSERT INTO %s (categoryid, parentid, name, description, total, weight, created) VALUES (NULL, %u, %s, %s, %u, %u, %u)', $this->db->prefix('smartfaq_categories'),
336
-                           $parentid, $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, time());
336
+                            $parentid, $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, time());
337 337
         } else {
338 338
             $sql = sprintf('UPDATE %s SET parentid = %u, name = %s, description = %s, total = %s, weight = %u, created = %u WHERE categoryid = %u', $this->db->prefix('smartfaq_categories'), $parentid,
339
-                           $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, $created, $categoryid);
339
+                            $this->db->quoteString($name), $this->db->quoteString($description), $total, $weight, $created, $categoryid);
340 340
         }
341 341
         if (false !== $force) {
342 342
             $result = $this->db->queryF($sql);
@@ -520,10 +520,10 @@  discard block
 block discarded – undo
520 520
         $ret   = array();
521 521
         $limit = $start = 0;
522 522
         $sql   = 'SELECT DISTINCT c.categoryid, c.parentid, c.name, c.description, c.total, c.weight, c.created FROM '
523
-                 . $this->db->prefix('smartfaq_categories')
524
-                 . ' AS c INNER JOIN '
525
-                 . $this->db->prefix('smartfaq_faq')
526
-                 . ' AS f ON c.categoryid = f.categoryid';
523
+                    . $this->db->prefix('smartfaq_categories')
524
+                    . ' AS c INNER JOIN '
525
+                    . $this->db->prefix('smartfaq_faq')
526
+                    . ' AS f ON c.categoryid = f.categoryid';
527 527
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
528 528
             $sql .= ' ' . $criteria->renderWhere();
529 529
             if ($criteria->getSort() != '') {
Please login to merge, or discard this patch.
class/answer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -472,10 +472,10 @@
 block discarded – undo
472 472
 
473 473
         if ($answerObj->isNew()) {
474 474
             $sql = sprintf('INSERT INTO %s (answerid, `status`, faqid, answer, uid, datesub, notifypub) VALUES (NULL, %u, %u, %s, %u, %u, %u)', $this->db->prefix('smartfaq_answers'), $status, $faqid,
475
-                           $this->db->quoteString($answer), $uid, time(), $notifypub);
475
+                            $this->db->quoteString($answer), $uid, time(), $notifypub);
476 476
         } else {
477 477
             $sql = sprintf('UPDATE %s SET STATUS = %u, faqid = %s, answer = %s, uid = %u, datesub = %u, notifypub = %u WHERE answerid = %u', $this->db->prefix('smartfaq_answers'), $status, $faqid,
478
-                           $this->db->quoteString($answer), $uid, $datesub, $notifypub, $answerid);
478
+                            $this->db->quoteString($answer), $uid, $datesub, $notifypub, $answerid);
479 479
         }
480 480
 
481 481
         if (false !== $force) {
Please login to merge, or discard this patch.
class/faq.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -647,16 +647,16 @@  discard block
 block discarded – undo
647 647
         }
648 648
 
649 649
         return $text
650
-               . $xoopsConfig['sitename']
651
-               . ' : <a href='
652
-               . XOOPS_URL
653
-               . '/modules/smartfaq/faq.php?faqid='
654
-               . $this->faqid()
655
-               . '>'
656
-               . XOOPS_URL
657
-               . '/modules/smartfaq/faq.php?faqid='
658
-               . $this->faqid()
659
-               . '</a>';
650
+                . $xoopsConfig['sitename']
651
+                . ' : <a href='
652
+                . XOOPS_URL
653
+                . '/modules/smartfaq/faq.php?faqid='
654
+                . $this->faqid()
655
+                . '>'
656
+                . XOOPS_URL
657
+                . '/modules/smartfaq/faq.php?faqid='
658
+                . $this->faqid()
659
+                . '</a>';
660 660
     }
661 661
 
662 662
     /**
@@ -778,14 +778,14 @@  discard block
 block discarded – undo
778 778
 
779 779
         if ($faq->isNew()) {
780 780
             $sql = sprintf('INSERT INTO %s (faqid, categoryid, question, howdoi, diduno, uid, datesub, `status`, counter, weight, html, smiley, xcodes, cancomment, comments, notifypub, modulelink, contextpage, exacturl, partialview) VALUES (NULL, %u, %s, %s, %s, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %s, %s, %u, %u)',
781
-                           $this->db->prefix('smartfaq_faq'), $categoryid, $this->db->quoteString($question), $this->db->quoteString($howdoi), $this->db->quoteString($diduno), $uid, time(), $status,
782
-                           $counter, $weight, $html, $smiley, $xcodes, $cancomment, $comments, $notifypub, $this->db->quoteString($modulelink), $this->db->quoteString($contextpage), $exacturl,
783
-                           $partialview);
781
+                            $this->db->prefix('smartfaq_faq'), $categoryid, $this->db->quoteString($question), $this->db->quoteString($howdoi), $this->db->quoteString($diduno), $uid, time(), $status,
782
+                            $counter, $weight, $html, $smiley, $xcodes, $cancomment, $comments, $notifypub, $this->db->quoteString($modulelink), $this->db->quoteString($contextpage), $exacturl,
783
+                            $partialview);
784 784
         } else {
785 785
             $sql = sprintf('UPDATE %s SET categoryid = %u, question = %s, howdoi = %s, diduno = %s, uid = %u, datesub = %u, `status` = %u, counter = %u, weight = %u, html = %u, smiley = %u, xcodes = %u, cancomment = %u, comments = %u, notifypub = %u, modulelink = %s, contextpage = %s, exacturl = %u, partialview = %u  WHERE faqid = %u',
786
-                           $this->db->prefix('smartfaq_faq'), $categoryid, $this->db->quoteString($question), $this->db->quoteString($howdoi), $this->db->quoteString($diduno), $uid, $datesub, $status,
787
-                           $counter, $weight, $html, $smiley, $xcodes, $cancomment, $comments, $notifypub, $this->db->quoteString($modulelink), $this->db->quoteString($contextpage), $exacturl,
788
-                           $partialview, $faqid);
786
+                            $this->db->prefix('smartfaq_faq'), $categoryid, $this->db->quoteString($question), $this->db->quoteString($howdoi), $this->db->quoteString($diduno), $uid, $datesub, $status,
787
+                            $counter, $weight, $html, $smiley, $xcodes, $cancomment, $comments, $notifypub, $this->db->quoteString($modulelink), $this->db->quoteString($contextpage), $exacturl,
788
+                            $partialview, $faqid);
789 789
         }
790 790
         if (false !== $force) {
791 791
             $result = $this->db->queryF($sql);
@@ -1618,10 +1618,10 @@  discard block
 block discarded – undo
1618 1618
         $criteria->setOrder('DESC');
1619 1619
 
1620 1620
         $sql = 'SELECT faq.faqid, faq.question, faq.datesub, faq.uid FROM '
1621
-               . $this->db->prefix('smartfaq_faq')
1622
-               . ' AS faq INNER JOIN '
1623
-               . $this->db->prefix('smartfaq_answers')
1624
-               . ' AS answer ON faq.faqid = answer.faqid';
1621
+                . $this->db->prefix('smartfaq_faq')
1622
+                . ' AS faq INNER JOIN '
1623
+                . $this->db->prefix('smartfaq_answers')
1624
+                . ' AS answer ON faq.faqid = answer.faqid';
1625 1625
 
1626 1626
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
1627 1627
             $whereClause = $criteria->renderWhere();
Please login to merge, or discard this patch.
admin/category.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-require_once __DIR__ . '/admin_header.php';
9
+require_once __DIR__.'/admin_header.php';
10 10
 
11 11
 // Creating the category handler object
12 12
 $categoryHandler = sf_gethandler('category');
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 }
22 22
 
23 23
 // Where do we start?
24
-$startcategory = isset($_GET['startcategory']) ? (int)$_GET['startcategory'] : 0;
24
+$startcategory = isset($_GET['startcategory']) ? (int) $_GET['startcategory'] : 0;
25 25
 
26 26
 /**
27 27
  * @param XoopsObject $categoryObj
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     $description = $categoryObj->description();
34 34
     if (!XOOPS_USE_MULTIBYTES) {
35 35
         if (strlen($description) >= 100) {
36
-            $description = substr($description, 0, 100 - 1) . '...';
36
+            $description = substr($description, 0, 100-1).'...';
37 37
         }
38 38
     }
39 39
     $modify = "<a href='category.php?op=mod&categoryid="
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
          . "/modules/smartfaq/assets/images/icon/subcat.gif' alt='' />&nbsp;"
77 77
          . $categoryObj->name()
78 78
          . '</a></td>';
79
-    echo "<td class='even' align='left'>" . $description . '</td>';
80
-    echo "<td class='even' align='center'>" . $categoryObj->weight() . '</td>';
79
+    echo "<td class='even' align='left'>".$description.'</td>';
80
+    echo "<td class='even' align='center'>".$categoryObj->weight().'</td>';
81 81
     echo "<td class='even' align='center'> $modify $delete </td>";
82 82
     echo '</tr>';
83 83
     $subCategoriesObj = $categoryHandler->getCategories(0, 0, $categoryObj->categoryid());
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 {
99 99
     //$moderators = array(); // just to define the variable
100 100
     //$allmods = array();
101
-    $startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0;
101
+    $startfaq = isset($_GET['startfaq']) ? (int) $_GET['startfaq'] : 0;
102 102
     global $categoryHandler, $xoopsUser, $xoopsUser, $myts, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $_GET;
103
-    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
103
+    include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
104 104
 
105 105
     // Creating the faq handler object
106 106
     $faqHandler = sf_gethandler('faq');
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
             redirect_header('category.php', 1, _AM_SF_NOCOLTOEDIT);
123 123
         }
124 124
         sf_collapsableBar('bottomtable', 'bottomtableicon');
125
-        echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a>&nbsp;" . _AM_SF_EDITCOL . '</h3>';
125
+        echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a>&nbsp;"._AM_SF_EDITCOL.'</h3>';
126 126
         echo "<div id='bottomtable'>";
127 127
     } else {
128 128
         $categoryObj = $categoryHandler->create();
129 129
         echo "<br>\n";
130 130
         sf_collapsableBar('bottomtable', 'bottomtableicon');
131
-        echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a>&nbsp;" . _AM_SF_CATEGORY_CREATE . '</h3>';
131
+        echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a>&nbsp;"._AM_SF_CATEGORY_CREATE.'</h3>';
132 132
         echo "<div id='bottomtable'>";
133 133
     }
134 134
     // Start category form
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     }
174 174
     $sform->addElement($groups_read_checkbox);
175 175
     // Apply permissions on all faqs
176
-    $addapplyall_radio = new XoopsFormRadioYN(_AM_SF_PERMISSIONS_APPLY_ON_FAQS, 'applyall', 0, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '');
176
+    $addapplyall_radio = new XoopsFormRadioYN(_AM_SF_PERMISSIONS_APPLY_ON_FAQS, 'applyall', 0, ' '._AM_SF_YES.'', ' '._AM_SF_NO.'');
177 177
     $sform->addElement($addapplyall_radio);
178 178
     // MODERATORS
179 179
     //$moderators_tray = new XoopsFormElementTray(_AM_SF_MODERATORS_DEF, '');
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     echo '</div>';
239 239
 
240 240
     if ($categoryid) {
241
-        include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/displayfaqs.php';
241
+        include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/displayfaqs.php';
242 242
     }
243 243
 
244 244
     unset($hidden);
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
 
247 247
 switch ($op) {
248 248
     case 'mod':
249
-        $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0;
249
+        $categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0;
250 250
         $destList   = isset($_POST['destList']) ? $_POST['destList'] : '';
251
-        $adminObject  = \Xmf\Module\Admin::getInstance();
251
+        $adminObject = \Xmf\Module\Admin::getInstance();
252 252
         xoops_cp_header();
253 253
 
254 254
         $adminObject->displayNavigation(basename(__FILE__));
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     case 'addcategory':
259 259
         global $_POST, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $modify, $myts, $categoryid;
260 260
 
261
-        $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0;
261
+        $categoryid = isset($_POST['categoryid']) ? (int) $_POST['categoryid'] : 0;
262 262
 
263 263
         if ($categoryid != 0) {
264 264
             $categoryObj = new sfCategory($categoryid);
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
         //if (isset($_POST['allmods'])) $allmods = $_POST['allmods'];
270 270
         //if (isset($_POST['moderators'])) $moderators = $_POST['moderators'];
271 271
 
272
-        $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int)$_POST['parentid'] : 0);
273
-        $applyall = isset($_POST['applyall']) ? (int)$_POST['applyall'] : 0;
274
-        $categoryObj->setVar('weight', isset($_POST['weight']) ? (int)$_POST['weight'] : 1);
272
+        $categoryObj->setVar('parentid', isset($_POST['parentid']) ? (int) $_POST['parentid'] : 0);
273
+        $applyall = isset($_POST['applyall']) ? (int) $_POST['applyall'] : 0;
274
+        $categoryObj->setVar('weight', isset($_POST['weight']) ? (int) $_POST['weight'] : 1);
275 275
 
276 276
         // Groups and permissions
277 277
         if (isset($_POST['groups_read'])) {
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
         }
295 295
 
296 296
         if (!$categoryObj->store()) {
297
-            redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR . sf_formatErrors($categoryObj->getErrors()));
297
+            redirect_header('javascript:history.go(-1)', 3, _AM_SF_CATEGORY_SAVE_ERROR.sf_formatErrors($categoryObj->getErrors()));
298 298
         }
299 299
         // TODO : put this function in the category class
300 300
         sf_saveCategory_Permissions($categoryObj->getGroups_read(), $categoryObj->categoryid(), 'category_read');
@@ -314,8 +314,8 @@  discard block
 block discarded – undo
314 314
         $module_id    = $xoopsModule->getVar('mid');
315 315
         $gpermHandler = xoops_getHandler('groupperm');
316 316
 
317
-        $categoryid = isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0;
318
-        $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : $categoryid;
317
+        $categoryid = isset($_POST['categoryid']) ? (int) $_POST['categoryid'] : 0;
318
+        $categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : $categoryid;
319 319
 
320 320
         $categoryObj = new sfCategory($categoryid);
321 321
 
@@ -329,14 +329,14 @@  discard block
 block discarded – undo
329 329
             redirect_header('category.php', 1, sprintf(_AM_SF_COLISDELETED, $name));
330 330
         } else {
331 331
             // no confirm: show deletion condition
332
-            $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0;
332
+            $categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0;
333 333
             xoops_cp_header();
334 334
             xoops_confirm(array(
335 335
                               'op'         => 'del',
336 336
                               'categoryid' => $categoryObj->categoryid(),
337 337
                               'confirm'    => 1,
338 338
                               'name'       => $categoryObj->name()
339
-                          ), 'category.php', _AM_SF_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE);
339
+                          ), 'category.php', _AM_SF_DELETECOL." '".$categoryObj->name()."'. <br> <br>"._AM_SF_DELETE_CAT_CONFIRM, _AM_SF_DELETE);
340 340
             xoops_cp_footer();
341 341
         }
342 342
         exit();
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         break;
348 348
     case 'default':
349 349
     default:
350
-        $adminObject  = \Xmf\Module\Admin::getInstance();
350
+        $adminObject = \Xmf\Module\Admin::getInstance();
351 351
         xoops_cp_header();
352 352
 
353 353
         $adminObject->displayNavigation(basename(__FILE__));
@@ -357,16 +357,16 @@  discard block
 block discarded – undo
357 357
         $categoriesObj = $categoryHandler->getCategories($xoopsModuleConfig['perpage'], $startcategory, 0);
358 358
 
359 359
         sf_collapsableBar('toptable', 'toptableicon');
360
-        echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt='' /></a>&nbsp;" . _AM_SF_CATEGORIES_TITLE . '</h3>';
360
+        echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt='' /></a>&nbsp;"._AM_SF_CATEGORIES_TITLE.'</h3>';
361 361
         echo "<div id='toptable'>";
362
-        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_CATEGORIES_DSC . '</span>';
362
+        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_CATEGORIES_DSC.'</span>';
363 363
 
364 364
         echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
365 365
         echo '<tr>';
366
-        echo "<th width='35%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>';
367
-        echo "<th class='bg3' align='left'><b>" . _AM_SF_DESCRIP . '</b></td>';
368
-        echo "<th class='bg3' width='65' align='center'><b>" . _AM_SF_WEIGHT . '</b></td>';
369
-        echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>';
366
+        echo "<th width='35%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME.'</b></td>';
367
+        echo "<th class='bg3' align='left'><b>"._AM_SF_DESCRIP.'</b></td>';
368
+        echo "<th class='bg3' width='65' align='center'><b>"._AM_SF_WEIGHT.'</b></td>';
369
+        echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>';
370 370
         echo '</tr>';
371 371
         $totalCategories = $categoryHandler->getCategoriesCount(0);
372 372
         if (count($categoriesObj) > 0) {
@@ -375,14 +375,14 @@  discard block
 block discarded – undo
375 375
             }
376 376
         } else {
377 377
             echo '<tr>';
378
-            echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOCAT . '</td>';
378
+            echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOCAT.'</td>';
379 379
             echo '</tr>';
380 380
             $categoryid = '0';
381 381
         }
382 382
         echo "</table>\n";
383
-        include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
383
+        include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
384 384
         $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['perpage'], $startcategory, 'startcategory');
385
-        echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
385
+        echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>';
386 386
         echo '</div>';
387 387
 
388 388
         editcat(false);
@@ -390,4 +390,4 @@  discard block
 block discarded – undo
390 390
         break;
391 391
 }
392 392
 
393
-require_once __DIR__ . '/admin_footer.php';
393
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -28,47 +28,47 @@  discard block
 block discarded – undo
28 28
 if (empty($fct)) {
29 29
     $fct = 'preferences';
30 30
 }
31
-include __DIR__ . '/../../../mainfile.php';
32
-include XOOPS_ROOT_PATH . '/include/cp_functions.php';
31
+include __DIR__.'/../../../mainfile.php';
32
+include XOOPS_ROOT_PATH.'/include/cp_functions.php';
33 33
 
34
-include_once XOOPS_ROOT_PATH . '/kernel/module.php';
34
+include_once XOOPS_ROOT_PATH.'/kernel/module.php';
35 35
 
36 36
 $admintest = 0;
37 37
 
38 38
 if (is_object($xoopsUser)) {
39 39
     $xoopsModule = XoopsModule::getByDirname('system');
40 40
     if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
41
-        redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
41
+        redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM);
42 42
     }
43 43
     $admintest = 1;
44 44
 } else {
45
-    redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
45
+    redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM);
46 46
 }
47 47
 
48 48
 // include system category definitions
49
-include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
49
+include_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
50 50
 $error = false;
51 51
 if ($admintest != 0) {
52 52
     if (isset($fct) && $fct != '') {
53
-        if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) {
54
-            include_once XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin.php';
53
+        if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php')) {
54
+            include_once XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin.php';
55 55
 
56
-            if (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php')) {
57
-                include XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/admin/' . $fct . '.php';
58
-            } elseif (file_exists(XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php')) {
59
-                include XOOPS_ROOT_PATH . '/modules/system/language/english/admin/' . $fct . '.php';
56
+            if (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin/'.$fct.'.php')) {
57
+                include XOOPS_ROOT_PATH.'/modules/system/language/'.$xoopsConfig['language'].'/admin/'.$fct.'.php';
58
+            } elseif (file_exists(XOOPS_ROOT_PATH.'/modules/system/language/english/admin/'.$fct.'.php')) {
59
+                include XOOPS_ROOT_PATH.'/modules/system/language/english/admin/'.$fct.'.php';
60 60
             }
61
-            include XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php';
61
+            include XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php';
62 62
             $syspermHandler = xoops_getHandler('groupperm');
63
-            $category       = !empty($modversion['category']) ? (int)$modversion['category'] : 0;
63
+            $category       = !empty($modversion['category']) ? (int) $modversion['category'] : 0;
64 64
             unset($modversion);
65 65
             if ($category > 0) {
66
-                $groups =& $xoopsUser->getGroups();
66
+                $groups = & $xoopsUser->getGroups();
67 67
                 if (in_array(XOOPS_GROUP_ADMIN, $groups)
68 68
                     || false !== $syspermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))
69 69
                 ) {
70 70
                     if (file_exists("../include/{$fct}.inc.php")) {
71
-                        include_once __DIR__ . "/../include/{$fct}.inc.php";
71
+                        include_once __DIR__."/../include/{$fct}.inc.php";
72 72
                     } else {
73 73
                         $error = true;
74 74
                     }
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
                     $error = true;
77 77
                 }
78 78
             } elseif ($fct === 'version') {
79
-                if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) {
80
-                    include_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php';
79
+                if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php')) {
80
+                    include_once XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php';
81 81
                 } else {
82 82
                     $error = true;
83 83
                 }
@@ -101,22 +101,22 @@  discard block
 block discarded – undo
101 101
     $all_ok = false;
102 102
     if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
103 103
         $syspermHandler = xoops_getHandler('groupperm');
104
-        $ok_syscats     =& $syspermHandler->getItemIds('system_admin', $groups);
104
+        $ok_syscats     = & $syspermHandler->getItemIds('system_admin', $groups);
105 105
     } else {
106 106
         $all_ok = true;
107 107
     }
108
-    $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin';
108
+    $admin_dir = XOOPS_ROOT_PATH.'/modules/system/admin';
109 109
     $handle    = opendir($admin_dir);
110 110
     $counter   = 0;
111 111
     $class     = 'even';
112 112
     while ($file = readdir($handle)) {
113
-        if (strtolower($file) !== 'cvs' && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) {
114
-            include $admin_dir . '/' . $file . '/xoops_version.php';
113
+        if (strtolower($file) !== 'cvs' && !preg_match('/[.]/', $file) && is_dir($admin_dir.'/'.$file)) {
114
+            include $admin_dir.'/'.$file.'/xoops_version.php';
115 115
             if ($modversion['hasAdmin']) {
116
-                $category = isset($modversion['category']) ? (int)$modversion['category'] : 0;
116
+                $category = isset($modversion['category']) ? (int) $modversion['category'] : 0;
117 117
                 if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) {
118 118
                     echo "<td class='$class' align='center' valign='bottom' width='19%'>";
119
-                    echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n";
119
+                    echo "<a href='".XOOPS_URL.'/modules/system/admin.php?fct='.$file."'><b>".trim($modversion['name'])."</b></a>\n";
120 120
                     echo '</td>';
121 121
                     ++$counter;
122 122
                     $class = ($class === 'even') ? 'odd' : 'even';
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         }
132 132
     }
133 133
     while ($counter < 5) {
134
-        echo '<td class="' . $class . '">&nbsp;</td>';
134
+        echo '<td class="'.$class.'">&nbsp;</td>';
135 135
         $class = ($class === 'even') ? 'odd' : 'even';
136 136
         ++$counter;
137 137
     }
Please login to merge, or discard this patch.