Completed
Push — master ( 48b96e...454ebd )
by Michael
02:08
created
notification_update.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
10
-include XOOPS_ROOT_PATH . '/include/notification_update.php';
9
+include __DIR__.'/../../mainfile.php';
10
+include XOOPS_ROOT_PATH.'/include/notification_update.php';
Please login to merge, or discard this patch.
class/category.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
      * create a new category
271 271
      *
272 272
      * @param  bool $isNew flag the new objects as "new"?
273
-     * @return object sfCategory
273
+     * @return sfCategory sfCategory
274 274
      */
275 275
     public function create($isNew = true)
276 276
     {
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     /**
313 313
      * insert a new category in the database
314 314
      *
315
-     * @param  XoopsObject $category reference to the {@link sfCategory} object
315
+     * @param  sfCategory $category reference to the {@link sfCategory} object
316 316
      * @param  bool        $force
317 317
      * @return bool        FALSE if failed, TRUE if already present and unchanged or successful
318 318
      */
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
             $sql = sprintf(
337 337
                 'INSERT INTO %s (categoryid, parentid, name, description, total, weight, created) VALUES (NULL, %u, %s, %s, %u, %u, %u)',
338 338
                 $this->db->prefix('smartfaq_categories'),
339
-                           $parentid,
339
+                            $parentid,
340 340
                 $this->db->quoteString($name),
341 341
                 $this->db->quoteString($description),
342 342
                 $total,
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
                 'UPDATE %s SET parentid = %u, name = %s, description = %s, total = %s, weight = %u, created = %u WHERE categoryid = %u',
349 349
                 $this->db->prefix('smartfaq_categories'),
350 350
                 $parentid,
351
-                           $this->db->quoteString($name),
351
+                            $this->db->quoteString($name),
352 352
                 $this->db->quoteString($description),
353 353
                 $total,
354 354
                 $weight,
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 $this->assignVars($id);
49 49
             } else {
50 50
                 $categoryHandler = new sfCategoryHandler($this->db);
51
-                $category        =& $categoryHandler->get($id);
51
+                $category        = & $categoryHandler->get($id);
52 52
                 foreach ($category->vars as $k => $v) {
53 53
                     $this->assignVar($k, $v['value']);
54 54
                 }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function checkPermission()
83 83
     {
84
-        require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
84
+        require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php';
85 85
 
86 86
         $userIsAdmin = sf_userIsAdmin();
87 87
         if ($userIsAdmin) {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             $filename = 'open_category.php';
159 159
         }
160 160
         if ($withAllLink) {
161
-            $ret = "<a href='" . XOOPS_URL . '/modules/smartfaq/' . $filename . '?categoryid=' . $this->categoryid() . "'>" . $this->name() . '</a>';
161
+            $ret = "<a href='".XOOPS_URL.'/modules/smartfaq/'.$filename.'?categoryid='.$this->categoryid()."'>".$this->name().'</a>';
162 162
         } else {
163 163
             $ret = $this->name();
164 164
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                 exit;
171 171
             }
172 172
             $parentid = $parentObj->parentid();
173
-            $ret      = $parentObj->getCategoryPath(true, $open) . ' > ' . $ret;
173
+            $ret      = $parentObj->getCategoryPath(true, $open).' > '.$ret;
174 174
         }
175 175
 
176 176
         return $ret;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         $tags                  = [];
225 225
         $tags['MODULE_NAME']   = $myts->htmlSpecialChars($smartModule->getVar('name'));
226 226
         $tags['CATEGORY_NAME'] = $this->name();
227
-        $tags['CATEGORY_URL']  = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/category.php?categoryid=' . $this->categoryid();
227
+        $tags['CATEGORY_URL']  = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/category.php?categoryid='.$this->categoryid();
228 228
 
229 229
         $notificationHandler = xoops_getHandler('notification');
230 230
         $notificationHandler->triggerEvent('global_faq', 0, 'category_created', $tags);
@@ -240,9 +240,9 @@  discard block
 block discarded – undo
240 240
         $category['categoryid'] = $this->categoryid();
241 241
         $category['name']       = $this->name();
242 242
         if (false !== $open) {
243
-            $category['categorylink'] = "<a href='" . XOOPS_URL . '/modules/smartfaq/open_category.php?categoryid=' . $this->categoryid() . "'>" . $this->name() . '</a>';
243
+            $category['categorylink'] = "<a href='".XOOPS_URL.'/modules/smartfaq/open_category.php?categoryid='.$this->categoryid()."'>".$this->name().'</a>';
244 244
         } else {
245
-            $category['categorylink'] = "<a href='" . XOOPS_URL . '/modules/smartfaq/category.php?categoryid=' . $this->categoryid() . "'>" . $this->name() . '</a>';
245
+            $category['categorylink'] = "<a href='".XOOPS_URL.'/modules/smartfaq/category.php?categoryid='.$this->categoryid()."'>".$this->name().'</a>';
246 246
         }
247 247
         $category['total']       = $this->getVar('faqcount');
248 248
         $category['description'] = $this->description();
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
     public function get($id)
292 292
     {
293 293
         $false = false;
294
-        if ((int)$id > 0) {
295
-            $sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_categories') . ' WHERE categoryid=' . $id;
294
+        if ((int) $id > 0) {
295
+            $sql = 'SELECT * FROM '.$this->db->prefix('smartfaq_categories').' WHERE categoryid='.$id;
296 296
             if (!$result = $this->db->query($sql)) {
297 297
                 return $false;
298 298
             }
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
         }
394 394
 
395 395
         // Deleteing the sub categories
396
-        $subcats =& $this->getCategories(0, 0, $category->categoryid());
396
+        $subcats = & $this->getCategories(0, 0, $category->categoryid());
397 397
         foreach ($subcats as $subcat) {
398 398
             $this->delete($subcat);
399 399
         }
@@ -430,11 +430,11 @@  discard block
 block discarded – undo
430 430
     {
431 431
         $ret   = [];
432 432
         $limit = $start = 0;
433
-        $sql   = 'SELECT * FROM ' . $this->db->prefix('smartfaq_categories');
433
+        $sql   = 'SELECT * FROM '.$this->db->prefix('smartfaq_categories');
434 434
         if (null !== $criteria && is_subclass_of($criteria, 'criteriaelement')) {
435
-            $sql .= ' ' . $criteria->renderWhere();
435
+            $sql .= ' '.$criteria->renderWhere();
436 436
             if ('' != $criteria->getSort()) {
437
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
437
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
438 438
             }
439 439
             $limit = $criteria->getLimit();
440 440
             $start = $criteria->getStart();
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
         $order = 'ASC',
477 477
         $id_as_key = true
478 478
     ) {
479
-        require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
479
+        require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php';
480 480
 
481 481
         $criteria = new CriteriaCompo();
482 482
 
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
             $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq');
491 491
 
492 492
             $categoriesGranted = $smartPermHandler->getPermissions('category');
493
-            $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
493
+            $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
494 494
         }
495 495
         $criteria->setStart($start);
496 496
         $criteria->setLimit($limit);
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
         $sort = 'weight',
515 515
         $order = 'ASC'
516 516
     ) {
517
-        require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
517
+        require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php';
518 518
 
519 519
         $criteria = new CriteriaCompo();
520 520
 
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
             $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq');
529 529
 
530 530
             $categoriesGranted = $smartPermHandler->getPermissions('category');
531
-            $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
531
+            $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
532 532
         }
533 533
 
534 534
         $criteria->add(new Criteria('f.status', _SF_STATUS_OPENED));
@@ -537,11 +537,11 @@  discard block
 block discarded – undo
537 537
 
538 538
         $ret   = [];
539 539
         $limit = $start = 0;
540
-        $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';
540
+        $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';
541 541
         if (null !== ($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
542
-            $sql .= ' ' . $criteria->renderWhere();
542
+            $sql .= ' '.$criteria->renderWhere();
543 543
             if ('' != $criteria->getSort()) {
544
-                $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
544
+                $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
545 545
             }
546 546
             $limit = $criteria->getLimit();
547 547
             $start = $criteria->getStart();
@@ -570,9 +570,9 @@  discard block
 block discarded – undo
570 570
      */
571 571
     public function getCount($criteria = null)
572 572
     {
573
-        $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('smartfaq_categories');
573
+        $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('smartfaq_categories');
574 574
         if (null !== ($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
575
-            $sql .= ' ' . $criteria->renderWhere();
575
+            $sql .= ' '.$criteria->renderWhere();
576 576
         }
577 577
         $result = $this->db->query($sql);
578 578
         if (!$result) {
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
                 $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq');
600 600
 
601 601
                 $categoriesGranted = $smartPermHandler->getPermissions('category');
602
-                $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
602
+                $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
603 603
             }
604 604
         }
605 605
 
@@ -622,16 +622,16 @@  discard block
 block discarded – undo
622 622
                 $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq');
623 623
 
624 624
                 $categoriesGranted = $smartPermHandler->getPermissions('category');
625
-                $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
625
+                $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
626 626
             }
627 627
         }
628 628
 
629 629
         $criteria->add(new Criteria('f.status', _SF_STATUS_OPENED));
630 630
 
631
-        $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';
631
+        $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';
632 632
 
633 633
         if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
634
-            $sql .= ' ' . $criteria->renderWhere();
634
+            $sql .= ' '.$criteria->renderWhere();
635 635
         }
636 636
 
637 637
         $result = $this->db->query($sql);
@@ -649,13 +649,13 @@  discard block
 block discarded – undo
649 649
      */
650 650
     public function getSubCats($categories)
651 651
     {
652
-        $criteria = new CriteriaCompo(new Criteria('parentid', '(' . implode(',', array_keys($categories)) . ')'), 'IN');
652
+        $criteria = new CriteriaCompo(new Criteria('parentid', '('.implode(',', array_keys($categories)).')'), 'IN');
653 653
         $ret      = [];
654 654
         if (!sf_userIsAdmin()) {
655 655
             $smartPermHandler = xoops_getModuleHandler('permission', 'smartfaq');
656 656
 
657 657
             $categoriesGranted = $smartPermHandler->getPermissions('category');
658
-            $criteria->add(new Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN'));
658
+            $criteria->add(new Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN'));
659 659
         }
660 660
         $subcats = $this->getObjects($criteria, true);
661 661
         foreach ($subcats as $subcat_id => $subcat) {
@@ -673,9 +673,9 @@  discard block
 block discarded – undo
673 673
      */
674 674
     public function deleteAll($criteria = null)
675 675
     {
676
-        $sql = 'DELETE FROM ' . $this->db->prefix('smartfaq_categories');
676
+        $sql = 'DELETE FROM '.$this->db->prefix('smartfaq_categories');
677 677
         if (null !== ($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
678
-            $sql .= ' ' . $criteria->renderWhere();
678
+            $sql .= ' '.$criteria->renderWhere();
679 679
         }
680 680
         if (!$this->db->query($sql)) {
681 681
             return false;
@@ -697,10 +697,10 @@  discard block
 block discarded – undo
697 697
      **/
698 698
     public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null)
699 699
     {
700
-        $set_clause = is_numeric($fieldvalue) ? $fieldname . ' = ' . $fieldvalue : $fieldname . ' = ' . $this->db->quoteString($fieldvalue);
701
-        $sql        = 'UPDATE ' . $this->db->prefix('smartfaq_categories') . ' SET ' . $set_clause;
700
+        $set_clause = is_numeric($fieldvalue) ? $fieldname.' = '.$fieldvalue : $fieldname.' = '.$this->db->quoteString($fieldvalue);
701
+        $sql        = 'UPDATE '.$this->db->prefix('smartfaq_categories').' SET '.$set_clause;
702 702
         if (null !== ($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
703
-            $sql .= ' ' . $criteria->renderWhere();
703
+            $sql .= ' '.$criteria->renderWhere();
704 704
         }
705 705
         if (!$this->db->queryF($sql)) {
706 706
             return false;
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
     public function faqsCount($cat_id = 0, $status = '')
727 727
     {
728 728
         global $xoopsUser;
729
-        require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
729
+        require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php';
730 730
 
731 731
         $faqHandler = sf_gethandler('faq');
732 732
 
Please login to merge, or discard this patch.
class/utility.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -649,7 +649,7 @@
 block discarded – undo
649 649
 
650 650
     /**
651 651
      * @param  string $url
652
-     * @return mixed|string
652
+     * @return string
653 653
      */
654 654
     public static function sf_getxoopslink($url = '')
655 655
     {
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 if (!mkdir($folder) && !is_dir($folder)) {
30 30
                     throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder));
31 31
                 } else {
32
-                    file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>');
32
+                    file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>');
33 33
                 }
34 34
             }
35 35
         } catch (Exception $e) {
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
         //    @mkdir($dst);
68 68
         while (false !== ($file = readdir($dir))) {
69 69
             if (('.' !== $file) && ('..' !== $file)) {
70
-                if (is_dir($src . '/' . $file)) {
71
-                    self::recurseCopy($src . '/' . $file, $dst . '/' . $file);
70
+                if (is_dir($src.'/'.$file)) {
71
+                    self::recurseCopy($src.'/'.$file, $dst.'/'.$file);
72 72
                 } else {
73
-                    copy($src . '/' . $file, $dst . '/' . $file);
73
+                    copy($src.'/'.$file, $dst.'/'.$file);
74 74
                 }
75 75
             }
76 76
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
98 98
         $currArray  = explode('.', $currentVer);
99 99
         if (null === $requiredVer) {
100
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
100
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
101 101
         }
102 102
         $reqArray = explode('.', $requiredVer);
103 103
         $success  = true;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                     break;
113 113
                 }
114 114
             } else {
115
-                if ((int)$v > 0) { // handles versions like x.x.x.0_RC2
115
+                if ((int) $v > 0) { // handles versions like x.x.x.0_RC2
116 116
                     $success = false;
117 117
                     break;
118 118
                 }
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
                 break;
204 204
 
205 205
             case 'inside':
206
-                return XOOPS_URL . '/modules/smartfaq/doc/';
206
+                return XOOPS_URL.'/modules/smartfaq/doc/';
207 207
                 break;
208 208
 
209 209
             case 'custom':
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     {
221 221
         $ret = '';
222 222
         foreach ($errors as $key => $value) {
223
-            $ret .= '<br> - ' . $value;
223
+            $ret .= '<br> - '.$value;
224 224
         }
225 225
 
226 226
         return $ret;
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
             $spaces .= '--';
244 244
         }
245 245
 
246
-        $ret .= "<option value='" . $categoryObj->categoryid() . "'";
246
+        $ret .= "<option value='".$categoryObj->categoryid()."'";
247 247
         if ($selectedid == $categoryObj->categoryid()) {
248 248
             $ret .= ' selected';
249 249
         }
250
-        $ret .= '>' . $spaces . $categoryObj->name() . "</option>\n";
250
+        $ret .= '>'.$spaces.$categoryObj->name()."</option>\n";
251 251
 
252 252
         $subCategoriesObj = $categoryHandler->getCategories(0, 0, $categoryObj->categoryid());
253 253
         if (count($subCategoriesObj) > 0) {
@@ -268,10 +268,10 @@  discard block
 block discarded – undo
268 268
      */
269 269
     public static function sf_createCategorySelect($selectedid = 0, $parentcategory = 0, $allCatOption = true)
270 270
     {
271
-        $ret = '' . _MB_SF_SELECTCAT . "&nbsp;<select name='options[]'>";
271
+        $ret = ''._MB_SF_SELECTCAT."&nbsp;<select name='options[]'>";
272 272
         if ($allCatOption) {
273 273
             $ret .= "<option value='0'";
274
-            $ret .= '>' . _MB_SF_ALLCAT . "</option>\n";
274
+            $ret .= '>'._MB_SF_ALLCAT."</option>\n";
275 275
         }
276 276
 
277 277
         // Creating the category handler object
@@ -339,9 +339,9 @@  discard block
 block discarded – undo
339 339
     {
340 340
         $smartModule = sf_getModuleInfo();
341 341
 
342
-        $modfootertxt = 'Module ' . $smartModule->getInfo('name') . ' - Version ' . $smartModule->getInfo('version') . '';
342
+        $modfootertxt = 'Module '.$smartModule->getInfo('name').' - Version '.$smartModule->getInfo('version').'';
343 343
 
344
-        $modfooter = "<a href='" . $smartModule->getInfo('support_site_url') . "' target='_blank'><img src='" . XOOPS_URL . "/modules/smartfaq/assets/images/sfcssbutton.gif' title='" . $modfootertxt . "' alt='" . $modfootertxt . "'></a>";
344
+        $modfooter = "<a href='".$smartModule->getInfo('support_site_url')."' target='_blank'><img src='".XOOPS_URL."/modules/smartfaq/assets/images/sfcssbutton.gif' title='".$modfootertxt."' alt='".$modfootertxt."'></a>";
345 345
 
346 346
         return $modfooter;
347 347
     }
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 
438 438
         $gpermHandler = xoops_getHandler('groupperm');
439 439
 
440
-        $sql    = 'SELECT faqid FROM ' . $xoopsDB->prefix('smartfaq_faq') . " WHERE categoryid = '$categoryid' ";
440
+        $sql    = 'SELECT faqid FROM '.$xoopsDB->prefix('smartfaq_faq')." WHERE categoryid = '$categoryid' ";
441 441
         $result = $xoopsDB->queryF($sql);
442 442
 
443 443
         if ($GLOBALS['xoopsDB']->getRowsNum($result) > 0) {
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
         $ret = [];
553 553
         global $xoopsDB;
554 554
 
555
-        $result = $xoopsDB->queryF('SELECT * FROM ' . $xoopsDB->prefix('smartfaq_faq') . " WHERE faqid = '$faqid'");
555
+        $result = $xoopsDB->queryF('SELECT * FROM '.$xoopsDB->prefix('smartfaq_faq')." WHERE faqid = '$faqid'");
556 556
         $ret    = $xoopsDB->fetcharray($result);
557 557
 
558 558
         return $ret;
@@ -571,26 +571,26 @@  discard block
 block discarded – undo
571 571
     {
572 572
         global $xoopsUser, $xoopsModule, $xoopsModuleConfig, $xoopsConfig;
573 573
         $adminLinks = '';
574
-        $modulePath = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/';
574
+        $modulePath = XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/';
575 575
         $page       = $open ? 'question.php' : 'faq.php';
576 576
         if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
577 577
             // Edit button
578
-            $adminLinks .= "<a href='" . $modulePath . "admin/$page?op=mod&amp;faqid=" . $faqid . "'><img src='" . $modulePath . "assets/images/links/edit.gif'" . " title='" . _MD_SF_EDIT . "' alt='" . _MD_SF_EDIT . "'></a>";
578
+            $adminLinks .= "<a href='".$modulePath."admin/$page?op=mod&amp;faqid=".$faqid."'><img src='".$modulePath."assets/images/links/edit.gif'"." title='"._MD_SF_EDIT."' alt='"._MD_SF_EDIT."'></a>";
579 579
             $adminLinks .= ' ';
580 580
             // Delete button
581
-            $adminLinks .= "<a href='" . $modulePath . "admin/$page?op=del&amp;faqid=" . $faqid . "'><img src='" . $modulePath . "assets/images/links/delete.gif'" . " title='" . _MD_SF_DELETE . "' alt='" . _MD_SF_DELETE . "'></a>";
581
+            $adminLinks .= "<a href='".$modulePath."admin/$page?op=del&amp;faqid=".$faqid."'><img src='".$modulePath."assets/images/links/delete.gif'"." title='"._MD_SF_DELETE."' alt='"._MD_SF_DELETE."'></a>";
582 582
             $adminLinks .= ' ';
583 583
         }
584 584
         // Print button
585
-        $adminLinks .= "<a href='" . $modulePath . 'print.php?faqid=' . $faqid . "'><img src='" . $modulePath . "assets/images/links/print.gif' title='" . _MD_SF_PRINT . "' alt='" . _MD_SF_PRINT . "'></a>";
585
+        $adminLinks .= "<a href='".$modulePath.'print.php?faqid='.$faqid."'><img src='".$modulePath."assets/images/links/print.gif' title='"._MD_SF_PRINT."' alt='"._MD_SF_PRINT."'></a>";
586 586
         $adminLinks .= ' ';
587 587
         // Email button
588
-        $maillink   = 'mailto:?subject=' . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']) . '&amp;body=' . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']) . ':  ' . $modulePath . 'faq.php?faqid=' . $faqid;
589
-        $adminLinks .= '<a href="' . $maillink . "\"><img src='" . $modulePath . "assets/images/links/friend.gif' title='" . _MD_SF_MAIL . "' alt='" . _MD_SF_MAIL . "'></a>";
588
+        $maillink = 'mailto:?subject='.sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']).'&amp;body='.sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']).':  '.$modulePath.'faq.php?faqid='.$faqid;
589
+        $adminLinks .= '<a href="'.$maillink."\"><img src='".$modulePath."assets/images/links/friend.gif' title='"._MD_SF_MAIL."' alt='"._MD_SF_MAIL."'></a>";
590 590
         $adminLinks .= ' ';
591 591
         // Submit New Answer button
592 592
         if ($xoopsModuleConfig['allownewanswer'] && (is_object($xoopsUser) || $xoopsModuleConfig['anonpost'])) {
593
-            $adminLinks .= "<a href='" . $modulePath . 'answer.php?faqid=' . $faqid . "'><img src='" . $modulePath . "assets/images/links/newanswer.gif' title='" . _MD_SF_SUBMITANSWER . "' alt='" . _MD_SF_SUBMITANSWER . "'></a>";
593
+            $adminLinks .= "<a href='".$modulePath.'answer.php?faqid='.$faqid."'><img src='".$modulePath."assets/images/links/newanswer.gif' title='"._MD_SF_SUBMITANSWER."' alt='"._MD_SF_SUBMITANSWER."'></a>";
594 594
             $adminLinks .= ' ';
595 595
         }
596 596
 
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
             return $userid;
612 612
         }
613 613
 
614
-        $userid = (int)$userid;
614
+        $userid = (int) $userid;
615 615
         if ($userid > 0) {
616 616
             if ($users == []) {
617 617
                 //fetching users
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
                 if (!isset($users[$userid])) {
622 622
                     return $GLOBALS['xoopsConfig']['anonymous'];
623 623
                 }
624
-                $user =& $users[$userid];
624
+                $user = & $users[$userid];
625 625
             }
626 626
 
627 627
             if (is_object($user)) {
@@ -635,9 +635,9 @@  discard block
 block discarded – undo
635 635
                     $fullname = $user->getVar('name');
636 636
                 }
637 637
                 if (!empty($fullname)) {
638
-                    $linkeduser = "$fullname [<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . $ts->htmlSpecialChars($username) . '</a>]';
638
+                    $linkeduser = "$fullname [<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".$ts->htmlSpecialChars($username).'</a>]';
639 639
                 } else {
640
-                    $linkeduser = "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . ucwords($ts->htmlSpecialChars($username)) . '</a>';
640
+                    $linkeduser = "<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".ucwords($ts->htmlSpecialChars($username)).'</a>';
641 641
                 }
642 642
 
643 643
                 return $linkeduser;
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
             //-->
720 720
         </script>
721 721
         <?php
722
-        echo "<h3 style=\"color: #2F5376; margin: 6px 0 0 0; \"><a href='#' onClick=\"toggle('" . $tablename . "'); toggleIcon('" . $iconname . "');\">";
722
+        echo "<h3 style=\"color: #2F5376; margin: 6px 0 0 0; \"><a href='#' onClick=\"toggle('".$tablename."'); toggleIcon('".$iconname."');\">";
723 723
     }
724 724
 
725 725
     /**
@@ -732,16 +732,16 @@  discard block
 block discarded – undo
732 732
         static $handlers;
733 733
         $name = strtolower(trim($name));
734 734
         if (!isset($handlers[$name])) {
735
-            if (file_exists($hnd_file = XOOPS_ROOT_PATH . '/modules/smartfaq/class/' . $name . '.php')) {
735
+            if (file_exists($hnd_file = XOOPS_ROOT_PATH.'/modules/smartfaq/class/'.$name.'.php')) {
736 736
                 require_once $hnd_file;
737 737
             }
738
-            $class = 'sf' . ucfirst($name) . 'Handler';
738
+            $class = 'sf'.ucfirst($name).'Handler';
739 739
             if (class_exists($class)) {
740 740
                 $handlers[$name] = new $class($GLOBALS['xoopsDB']);
741 741
             }
742 742
         }
743 743
         if (!$optional && !isset($handlers[$name])) {
744
-            trigger_error('Class <b>' . $class . '</b> does not exist<br>Handler Name: ' . $name, E_USER_ERROR);
744
+            trigger_error('Class <b>'.$class.'</b> does not exist<br>Handler Name: '.$name, E_USER_ERROR);
745 745
         }
746 746
         $false = false;
747 747
 
Please login to merge, or discard this patch.
comment_reply.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
10
-require_once XOOPS_ROOT_PATH . '/include/comment_reply.php';
9
+include __DIR__.'/../../mainfile.php';
10
+require_once XOOPS_ROOT_PATH.'/include/comment_reply.php';
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
9
+include __DIR__.'/../../mainfile.php';
10 10
 
11
-require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
12
-require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php';
13
-require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/faq.php';
14
-require_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/answer.php';
11
+require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php';
12
+require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php';
13
+require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php';
14
+require_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php';
15 15
 
16 16
 $myts = MyTextSanitizer::getInstance();
Please login to merge, or discard this patch.
comment_edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
10
-require_once XOOPS_ROOT_PATH . '/include/comment_edit.php';
9
+include __DIR__.'/../../mainfile.php';
10
+require_once XOOPS_ROOT_PATH.'/include/comment_edit.php';
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 //$modversion['icons32']             = '../../Frameworks/moduleclasses/icons/32';
27 27
 $modversion['modicons16']          = 'assets/images/icons/16';
28 28
 $modversion['modicons32']          = 'assets/images/icons/32';
29
-$modversion['release_file']        = XOOPS_URL . '/modules/' . $modversion['dirname'] . '/docs/changelog.txt';
29
+$modversion['release_file']        = XOOPS_URL.'/modules/'.$modversion['dirname'].'/docs/changelog.txt';
30 30
 $modversion['module_website_url']  = 'www.xoops.org';
31 31
 $modversion['module_website_name'] = 'XOOPS';
32 32
 $modversion['min_php']             = '5.5';
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
 
97 97
 // Tables created by sql file (without prefix!)
98 98
 $modversion['tables'] = [
99
-    $moduleDirName . '_' . 'categories',
100
-    $moduleDirName . '_' . 'faq',
101
-    $moduleDirName . '_' . 'answers'
99
+    $moduleDirName.'_'.'categories',
100
+    $moduleDirName.'_'.'faq',
101
+    $moduleDirName.'_'.'answers'
102 102
 ];
103 103
 
104 104
 // Search
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             $modversion['sub'][2]['url']  = 'request.php?op=add';
151 151
         }
152 152
 
153
-        require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
153
+        require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php';
154 154
 
155 155
         // Creating the FAQ handler object
156 156
         $faqHandler = sf_gethandler('faq');
Please login to merge, or discard this patch.
admin/admin_header.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../include/cp_header.php';
20
+require_once __DIR__.'/../../../include/cp_header.php';
21 21
 //require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');
22 22
 
23 23
 //require_once __DIR__ . '/../class/utility.php';
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
 $moduleDirName = basename(dirname(__DIR__));
27 27
 
28 28
 $path = dirname(dirname(dirname(__DIR__)));
29
-require_once $path . '/kernel/module.php';
30
-require_once $path . '/class/xoopstree.php';
31
-require_once $path . '/class/xoopslists.php';
32
-require_once $path . '/class/pagenav.php';
33
-require_once $path . '/class/xoopsformloader.php';
34
-
35
-require_once __DIR__ . '/../include/functions.php';
36
-require_once __DIR__ . '/../class/category.php';
37
-require_once __DIR__ . '/../class/faq.php';
38
-require_once __DIR__ . '/../class/answer.php';
29
+require_once $path.'/kernel/module.php';
30
+require_once $path.'/class/xoopstree.php';
31
+require_once $path.'/class/xoopslists.php';
32
+require_once $path.'/class/pagenav.php';
33
+require_once $path.'/class/xoopsformloader.php';
34
+
35
+require_once __DIR__.'/../include/functions.php';
36
+require_once __DIR__.'/../class/category.php';
37
+require_once __DIR__.'/../class/faq.php';
38
+require_once __DIR__.'/../class/answer.php';
39 39
 //require_once __DIR__ . '/../class/utility.php';
40 40
 //require_once __DIR__ . '/../include/common.php';
41 41
 
Please login to merge, or discard this patch.
admin/admin_footer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
  */
19 19
 
20 20
 $pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);
21
-echo "<div class='adminfooter'>\n" . "  <div style='text-align: center;'>\n" . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . "  </div>\n" . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';
21
+echo "<div class='adminfooter'>\n"."  <div style='text-align: center;'>\n"."    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"."  </div>\n".'  '._AM_MODULEADMIN_ADMIN_FOOTER."\n".'</div>';
22 22
 
23 23
 xoops_cp_footer();
Please login to merge, or discard this patch.