Completed
Push — master ( 721049...80219e )
by Michael
04:08
created
class/CategoryHandler.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $false = false;
49 49
         if ((int)$id > 0) {
50
-            $sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_categories') . ' WHERE categoryid=' . $id;
50
+            $sql = 'SELECT * FROM '.$this->db->prefix('smartfaq_categories').' WHERE categoryid='.$id;
51 51
             if (!$result = $this->db->query($sql)) {
52 52
                 return $false;
53 53
             }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         // Deleteing the sub categories
152
-        $subcats =& $this->getCategories(0, 0, $category->categoryid());
152
+        $subcats = & $this->getCategories(0, 0, $category->categoryid());
153 153
         foreach ($subcats as $subcat) {
154 154
             $this->delete($subcat);
155 155
         }
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
186 186
     {
187 187
         $ret   = [];
188 188
         $limit = $start = 0;
189
-        $sql   = 'SELECT * FROM ' . $this->db->prefix('smartfaq_categories');
189
+        $sql   = 'SELECT * FROM '.$this->db->prefix('smartfaq_categories');
190 190
         if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) {
191
-            $sql .= ' ' . $criteria->renderWhere();
191
+            $sql .= ' '.$criteria->renderWhere();
192 192
             if ('' != $criteria->getSort()) {
193
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
193
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
194 194
             }
195 195
             $limit = $criteria->getLimit();
196 196
             $start = $criteria->getStart();
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission');
248 248
 
249 249
             $categoriesGranted = $smartPermHandler->getPermissions('category');
250
-            $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
250
+            $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
251 251
         }
252 252
         $criteria->setStart($start);
253 253
         $criteria->setLimit($limit);
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission');
287 287
 
288 288
             $categoriesGranted = $smartPermHandler->getPermissions('category');
289
-            $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
289
+            $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
290 290
         }
291 291
 
292 292
         $criteria->add(new \Criteria('f.status', Constants::SF_STATUS_OPENED));
@@ -295,11 +295,11 @@  discard block
 block discarded – undo
295 295
 
296 296
         $ret   = [];
297 297
         $limit = $start = 0;
298
-        $sql   = 'SELECT DISTINCT c.categoryid, c.parentid, c.name, c.description, c.total, c.weight, c.created FROM ' . $this->db->prefix('smartfaq_categories') . ' AS c INNER JOIN ' . $this->db->prefix('smartfaq_faq') . ' AS f ON c.categoryid = f.categoryid';
298
+        $sql   = 'SELECT DISTINCT c.categoryid, c.parentid, c.name, c.description, c.total, c.weight, c.created FROM '.$this->db->prefix('smartfaq_categories').' AS c INNER JOIN '.$this->db->prefix('smartfaq_faq').' AS f ON c.categoryid = f.categoryid';
299 299
         if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) {
300
-            $sql .= ' ' . $criteria->renderWhere();
300
+            $sql .= ' '.$criteria->renderWhere();
301 301
             if ('' != $criteria->getSort()) {
302
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
302
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
303 303
             }
304 304
             $limit = $criteria->getLimit();
305 305
             $start = $criteria->getStart();
@@ -328,9 +328,9 @@  discard block
 block discarded – undo
328 328
      */
329 329
     public function getCount($criteria = null)
330 330
     {
331
-        $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('smartfaq_categories');
331
+        $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('smartfaq_categories');
332 332
         if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) {
333
-            $sql .= ' ' . $criteria->renderWhere();
333
+            $sql .= ' '.$criteria->renderWhere();
334 334
         }
335 335
         $result = $this->db->query($sql);
336 336
         if (!$result) {
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
                 $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission');
359 359
 
360 360
                 $categoriesGranted = $smartPermHandler->getPermissions('category');
361
-                $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
361
+                $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
362 362
             }
363 363
         }
364 364
 
@@ -382,16 +382,16 @@  discard block
 block discarded – undo
382 382
                 $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission');
383 383
 
384 384
                 $categoriesGranted = $smartPermHandler->getPermissions('category');
385
-                $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
385
+                $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
386 386
             }
387 387
         }
388 388
 
389 389
         $criteria->add(new \Criteria('f.status', Constants::SF_STATUS_OPENED));
390 390
 
391
-        $sql = 'SELECT COUNT(c.categoryid) FROM ' . $this->db->prefix('smartfaq_categories') . ' AS c INNER JOIN ' . $this->db->prefix('smartfaq_faq') . ' AS f ON c.categoryid = f.categoryid';
391
+        $sql = 'SELECT COUNT(c.categoryid) FROM '.$this->db->prefix('smartfaq_categories').' AS c INNER JOIN '.$this->db->prefix('smartfaq_faq').' AS f ON c.categoryid = f.categoryid';
392 392
 
393 393
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
394
-            $sql .= ' ' . $criteria->renderWhere();
394
+            $sql .= ' '.$criteria->renderWhere();
395 395
         }
396 396
 
397 397
         $result = $this->db->query($sql);
@@ -409,16 +409,16 @@  discard block
 block discarded – undo
409 409
      */
410 410
     public function getSubCats($categories)
411 411
     {
412
-        $criteria = new \CriteriaCompo(new \Criteria('parentid', '(' . implode(',', array_keys($categories)) . ')'), 'IN');
412
+        $criteria = new \CriteriaCompo(new \Criteria('parentid', '('.implode(',', array_keys($categories)).')'), 'IN');
413 413
         $ret      = [];
414 414
         if (!Smartfaq\Utility::userIsAdmin()) {
415 415
             /** @var Smartfaq\PermissionHandler $smartPermHandler */
416 416
             $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission');
417 417
 
418 418
             $categoriesGranted = $smartPermHandler->getPermissions('category');
419
-            $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
419
+            $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
420 420
         }
421
-        $subcats =& $this->getObjects($criteria, true);
421
+        $subcats = & $this->getObjects($criteria, true);
422 422
         foreach ($subcats as $subcat_id => $subcat) {
423 423
             $ret[$subcat->getVar('parentid')][$subcat->getVar('categoryid')] = $subcat;
424 424
         }
@@ -434,9 +434,9 @@  discard block
 block discarded – undo
434 434
      */
435 435
     public function deleteAll($criteria = null)
436 436
     {
437
-        $sql = 'DELETE FROM ' . $this->db->prefix('smartfaq_categories');
437
+        $sql = 'DELETE FROM '.$this->db->prefix('smartfaq_categories');
438 438
         if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) {
439
-            $sql .= ' ' . $criteria->renderWhere();
439
+            $sql .= ' '.$criteria->renderWhere();
440 440
         }
441 441
         if (!$this->db->query($sql)) {
442 442
             return false;
@@ -458,10 +458,10 @@  discard block
 block discarded – undo
458 458
      **/
459 459
     public function updateAll($fieldname, $fieldvalue, \CriteriaElement $criteria = null)
460 460
     {
461
-        $set_clause = is_numeric($fieldvalue) ? $fieldname . ' = ' . $fieldvalue : $fieldname . ' = ' . $this->db->quoteString($fieldvalue);
462
-        $sql        = 'UPDATE ' . $this->db->prefix('smartfaq_categories') . ' SET ' . $set_clause;
461
+        $set_clause = is_numeric($fieldvalue) ? $fieldname.' = '.$fieldvalue : $fieldname.' = '.$this->db->quoteString($fieldvalue);
462
+        $sql        = 'UPDATE '.$this->db->prefix('smartfaq_categories').' SET '.$set_clause;
463 463
         if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) {
464
-            $sql .= ' ' . $criteria->renderWhere();
464
+            $sql .= ' '.$criteria->renderWhere();
465 465
         }
466 466
         if (!$this->db->queryF($sql)) {
467 467
             return false;
Please login to merge, or discard this patch.
class/FaqHandler.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
         if ($faq->isNew()) {
95 95
             $sql = sprintf(
96 96
                 '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)',
97
-                           $this->db->prefix('smartfaq_faq'),
97
+                            $this->db->prefix('smartfaq_faq'),
98 98
                 $categoryid,
99 99
                 $this->db->quoteString($question),
100 100
                 $this->db->quoteString($howdoi),
Please login to merge, or discard this patch.
language/english/common.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -21,61 +21,61 @@
 block discarded – undo
21 21
 $moduleDirName      = basename(dirname(dirname(__DIR__)));
22 22
 $moduleDirNameUpper = strtoupper($moduleDirName);
23 23
 
24
-define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: ');
25
-define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: ');
26
-define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
27
-define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
28
-define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status');
29
-define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
30
-define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
31
-define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
32
-define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
33
-define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>");
34
-define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>");
35
-define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: ');
36
-define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: ');
37
-define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
38
-define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
24
+define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: ');
25
+define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: ');
26
+define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
27
+define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
28
+define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status');
29
+define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
30
+define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
31
+define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
32
+define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
33
+define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>");
34
+define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>");
35
+define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: ');
36
+define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: ');
37
+define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
38
+define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
39 39
 
40
-define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>");
41
-define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
40
+define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>");
41
+define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
42 42
 
43 43
 
44
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
45
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields");
46
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
47
-define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s');
48
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
49
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
50
-define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
44
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
45
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields");
46
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
47
+define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s');
48
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
49
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
50
+define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
51 51
 
52
-define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
52
+define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
53 53
 
54 54
 // Error Msgs
55
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
56
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s');
57
-define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin');
55
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
56
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s');
57
+define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin');
58 58
 
59 59
 
60 60
 //Help
61
-define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(dirname(__DIR__))));
62
-define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
63
-define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of ');
64
-define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview');
61
+define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(dirname(__DIR__))));
62
+define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
63
+define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of ');
64
+define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview');
65 65
 
66 66
 //define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__);
67 67
 
68 68
 //help multi-page
69
-define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer');
70
-define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License');
71
-define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support');
69
+define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer');
70
+define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License');
71
+define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support');
72 72
 
73 73
 //Sample Data
74
-define('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
75
-define('CO_' . $moduleDirNameUpper . '_' . 'SAMPLEDATA_SUCCESS', 'Sample Date uploaded successfully');
76
-define('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA', 'Export Tables to YAML');
77
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
78
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
79
-define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA', 'Export DB Schema to YAML');
80
-define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
81
-define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
74
+define('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
75
+define('CO_'.$moduleDirNameUpper.'_'.'SAMPLEDATA_SUCCESS', 'Sample Date uploaded successfully');
76
+define('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA', 'Export Tables to YAML');
77
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
78
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
79
+define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA', 'Export DB Schema to YAML');
80
+define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
81
+define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Smartfaq\Constants;
21 21
 
22
-require_once __DIR__ . '/../../../include/cp_header.php';
23
-require_once __DIR__ . '/admin_header.php';
22
+require_once __DIR__.'/../../../include/cp_header.php';
23
+require_once __DIR__.'/admin_header.php';
24 24
 
25 25
 xoops_cp_header();
26 26
 
@@ -76,34 +76,34 @@  discard block
 block discarded – undo
76 76
 $adminObject->addInfoBox(_AM_SF_INVENTORY);
77 77
 
78 78
 if ($totalcategories > 0) {
79
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALCAT . '</a><b>' . '</infolabel>', $totalcategories), '', 'Green');
79
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALCAT.'</a><b>'.'</infolabel>', $totalcategories), '', 'Green');
80 80
 } else {
81
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALCAT . '</infolabel>', $totalcategories), '', 'Green');
81
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALCAT.'</infolabel>', $totalcategories), '', 'Green');
82 82
 }
83 83
 if ($totalasked > 0) {
84
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALASKED . '</a><b>' . '</infolabel>', $totalasked), '', 'Green');
84
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALASKED.'</a><b>'.'</infolabel>', $totalasked), '', 'Green');
85 85
 } else {
86
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALASKED . '</infolabel>', $totalasked), '', 'Green');
86
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALASKED.'</infolabel>', $totalasked), '', 'Green');
87 87
 }
88 88
 if ($totalopened > 0) {
89
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="question.php">' . _AM_SF_TOTALOPENED . '</a><b>' . '</infolabel>', $totalopened), '', 'Red');
89
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="question.php">'._AM_SF_TOTALOPENED.'</a><b>'.'</infolabel>', $totalopened), '', 'Red');
90 90
 } else {
91
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALOPENED . '</infolabel>', $totalopened), '', 'Green');
91
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALOPENED.'</infolabel>', $totalopened), '', 'Green');
92 92
 }
93 93
 if ($totalsubmitted > 0) {
94
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="category.php">' . _AM_SF_TOTALSUBMITTED . '</a><b>' . '</infolabel>', $totalsubmitted), '', 'Green');
94
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="category.php">'._AM_SF_TOTALSUBMITTED.'</a><b>'.'</infolabel>', $totalsubmitted), '', 'Green');
95 95
 } else {
96
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALSUBMITTED . '</infolabel>', $totalsubmitted), '', 'Green');
96
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALSUBMITTED.'</infolabel>', $totalsubmitted), '', 'Green');
97 97
 }
98 98
 if ($totalpublished > 0) {
99
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="faq.php">' . _AM_SF_TOTALPUBLISHED . '</a><b>' . '</infolabel>', $totalpublished), '', 'Green');
99
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="faq.php">'._AM_SF_TOTALPUBLISHED.'</a><b>'.'</infolabel>', $totalpublished), '', 'Green');
100 100
 } else {
101
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALPUBLISHED . '</infolabel>', $totalpublished), '', 'Green');
101
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALPUBLISHED.'</infolabel>', $totalpublished), '', 'Green');
102 102
 }
103 103
 if ($totalnewanswers > 0) {
104
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . '<a href="main.php">' . _AM_SF_TOTALNEWANSWERS . '</a><b>' . '</infolabel>', $totalnewanswers), '', 'Red');
104
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'.'<a href="main.php">'._AM_SF_TOTALNEWANSWERS.'</a><b>'.'</infolabel>', $totalnewanswers), '', 'Red');
105 105
 } else {
106
-    $adminObject->addInfoBoxLine(sprintf('<infolabel>' . _AM_SF_TOTALNEWANSWERS . '</infolabel>', $totalnewanswers), '', 'Green');
106
+    $adminObject->addInfoBoxLine(sprintf('<infolabel>'._AM_SF_TOTALNEWANSWERS.'</infolabel>', $totalnewanswers), '', 'Green');
107 107
 }
108 108
 
109 109
 //----------------------
@@ -113,4 +113,4 @@  discard block
 block discarded – undo
113 113
 
114 114
 echo $utility::getServerStats();
115 115
 
116
-require_once __DIR__ . '/admin_footer.php';
116
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/permissions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 
9 9
 use XoopsModules\Smartfaq;
10 10
 
11
-require_once __DIR__ . '/admin_header.php';
12
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php';
11
+require_once __DIR__.'/admin_header.php';
12
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php';
13 13
 
14
-if (! Smartfaq\Utility::userIsAdmin()) {
14
+if (!Smartfaq\Utility::userIsAdmin()) {
15 15
     redirect_header('javascript:history.go(-1)', 1, _NOPERM);
16 16
 }
17 17
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ;
40 40
         Smartfaq\Utility::collapsableBar('toptable', 'toptableicon');
41 41
 
42
-        $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' ');
42
+        $result_view = $xoopsDB->query('SELECT categoryid, name FROM '.$xoopsDB->prefix('smartfaq_categories').' ');
43 43
         if ($xoopsDB->getRowsNum($result_view)) {
44 44
             while (false !== ($myrow_view = $xoopsDB->fetchArray($result_view))) {
45 45
                 $item_list_view['cid']   = $myrow_view['categoryid'];
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                                                                                                                     . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
54 54
                                                                                                                     . _AM_SF_VIEW_CATS
55 55
                                                                                                                     . '</span>', 'admin/permissions.php');
56
-                $block_view[]            = $item_list_view;
56
+                $block_view[] = $item_list_view;
57 57
                 foreach ($block_view as $itemlists) {
58 58
                     $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title']));
59 59
                 }
@@ -75,4 +75,4 @@  discard block
 block discarded – undo
75 75
         echo "<br>\n";
76 76
 }
77 77
 
78
-require_once __DIR__ . '/admin_footer.php';
78
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.