Completed
Push — master ( 8e5652...4e30dc )
by Michael
02:28
created
admin/faq.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 $startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0;
30 30
 
31 31
 /**
32
- * @param bool $showmenu
32
+ * @param string $showmenu
33 33
  * @param int  $faqid
34 34
  * @param int  $answerid
35 35
  * @param bool $merge
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -562,11 +562,11 @@
 block discarded – undo
562 562
             $faqid =  Request::getInt('faqid', 0, 'POST');
563 563
             xoops_cp_header();
564 564
             xoops_confirm([
565
-                              'op'      => 'del',
566
-                              'faqid'   => $faqObj->faqid(),
567
-                              'confirm' => 1,
568
-                              'name'    => $faqObj->question()
569
-                          ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
565
+                                'op'      => 'del',
566
+                                'faqid'   => $faqObj->faqid(),
567
+                                'confirm' => 1,
568
+                                'name'    => $faqObj->question()
569
+                            ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
570 570
             xoops_cp_footer();
571 571
         }
572 572
 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 use XoopsModules\Smartfaq;
11 11
 use XoopsModules\Smartfaq\Constants;
12 12
 
13
-require_once __DIR__ . '/admin_header.php';
13
+require_once __DIR__.'/admin_header.php';
14 14
 
15 15
 // Creating the faq handler object
16 16
 /** @var \XoopsModules\Smartfaq\FaqHandler $faqHandler */
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 }
34 34
 
35 35
 // Where shall we start?
36
-$startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0;
36
+$startfaq = isset($_GET['startfaq']) ? (int) $_GET['startfaq'] : 0;
37 37
 
38 38
 /**
39 39
  * @param bool $showmenu
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 {
46 46
     global $answerHandler, $faqHandler, $categoryHandler, $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts;
47 47
 
48
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
48
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
49 49
     // If there is a parameter, and the id exists, retrieve data: we're editing a faq
50 50
     if (-1 != $faqid) {
51 51
         // Creating the FAQ object
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
 
148 148
         echo "<br>\n";
149 149
         Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon');
150
-        echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a>&nbsp;" . $collapsableBar_title . '</h3>';
150
+        echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a>&nbsp;".$collapsableBar_title.'</h3>';
151 151
         echo "<div id='bottomtable'>";
152
-        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $collapsableBar_info . '</span>';
152
+        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$collapsableBar_info.'</span>';
153 153
     } else {
154 154
         // there's no parameter, so we're adding a faq
155 155
         $faqObj = $faqHandler->create();
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $button_caption     = _AM_SF_CREATE;
164 164
 
165 165
         Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon');
166
-        echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a>&nbsp;" . _AM_SF_CREATESMARTFAQ . '</h3>';
166
+        echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a>&nbsp;"._AM_SF_CREATESMARTFAQ.'</h3>';
167 167
         echo "<div id='bottomtable'>";
168 168
     }
169 169
     $sform = new \XoopsThemeForm(_AM_SF_SMARTFAQ, 'op', xoops_getenv('PHP_SELF'), 'post', true);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
     // ANSWER
196 196
     if ($merge) {
197
-        $theanswer = $originalAnswerObj->answer('e') . "\n\n" . sprintf(_AM_SF_NEW_CONTRIBUTION, Smartfaq\Utility::getLinkedUnameFromId($answerObj->uid(), $xoopsModuleConfig['userealname']), $answerObj->datesub(), $answerObj->answer('e'));
197
+        $theanswer = $originalAnswerObj->answer('e')."\n\n".sprintf(_AM_SF_NEW_CONTRIBUTION, Smartfaq\Utility::getLinkedUnameFromId($answerObj->uid(), $xoopsModuleConfig['userealname']), $answerObj->datesub(), $answerObj->answer('e'));
198 198
     } else {
199 199
         $theanswer = $answerObj->answer('e');
200 200
     }
@@ -243,14 +243,14 @@  discard block
 block discarded – undo
243 243
     $sform->addElement(new \XoopsFormText(_AM_SF_SPECIFIC_URL, 'contextpage', 50, 60, $faqObj->contextpage()), false);
244 244
 
245 245
     // EXACT URL?
246
-    $excaturl_radio = new \XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '');
246
+    $excaturl_radio = new \XoopsFormRadioYN(_AM_SF_EXACTURL, 'exacturl', $faqObj->exacturl(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.'');
247 247
     $sform->addElement($excaturl_radio);
248 248
     // WEIGHT
249 249
     $sform->addElement(new \XoopsFormText(_AM_SF_WEIGHT, 'weight', 5, 5, $faqObj->weight()), true);
250 250
 
251 251
     // COMMENTS
252 252
     // Code to allow comments
253
-    $addcomments_radio = new \XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '');
253
+    $addcomments_radio = new \XoopsFormRadioYN(_AM_SF_ALLOWCOMMENTS, 'cancomment', $faqObj->cancomment(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.'');
254 254
     $sform->addElement($addcomments_radio);
255 255
 
256 256
     // PER ITEM PERMISSIONS
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     }
265 265
     $sform->addElement($groups_checkbox);
266 266
 
267
-    $partial_view = new \XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '');
267
+    $partial_view = new \XoopsFormRadioYN(_AM_SF_PARTIALVIEW, 'partialview', $faqObj->partialview(), ' '._AM_SF_YES.'', ' '._AM_SF_NO.'');
268 268
     $sform->addElement($partial_view);
269 269
 
270 270
     // VARIOUS OPTIONS
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
     // OFFLINE
288 288
     if (Constants::SF_STATUS_OFFLINE == $faqObj->status()) {
289 289
         // Back OnLine
290
-        $offline_radio = new \XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' ' . _AM_SF_YES . '', ' ' . _AM_SF_NO . '');
290
+        $offline_radio = new \XoopsFormRadioYN(_AM_SF_OFFLINE_FIELD, 'offline', 1, ' '._AM_SF_YES.'', ' '._AM_SF_NO.'');
291 291
         $sform->addElement($offline_radio);
292 292
     }
293 293
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
         }
362 362
 
363 363
         xoops_cp_header();
364
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
364
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
365 365
 
366 366
         editfaq(true, $faqid, $answerid, true);
367 367
         break;
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         xoops_cp_header();
383 383
 
384 384
         $adminObject->displayNavigation(basename(__FILE__));
385
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
385
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
386 386
 
387 387
         editfaq(true, $faqid, $answerid);
388 388
         break;
@@ -520,13 +520,13 @@  discard block
 block discarded – undo
520 520
 
521 521
         // Storing the FAQ
522 522
         if (!$faqObj->store()) {
523
-            redirect_header('javascript:history.go(-1)', 3, $error_msg . Smartfaq\Utility::formatErrors($faqObj->getErrors()));
523
+            redirect_header('javascript:history.go(-1)', 3, $error_msg.Smartfaq\Utility::formatErrors($faqObj->getErrors()));
524 524
         }
525 525
 
526 526
         // Storing the answer
527 527
         $answerObj->setVar('faqid', $faqObj->faqid());
528 528
         if (!$answerObj->store()) {
529
-            redirect_header('javascript:history.go(-1)', 3, $error_msg . Smartfaq\Utility::formatErrors($answerObj->getErrors()));
529
+            redirect_header('javascript:history.go(-1)', 3, $error_msg.Smartfaq\Utility::formatErrors($answerObj->getErrors()));
530 530
         }
531 531
 
532 532
         // Send notifications
@@ -553,20 +553,20 @@  discard block
 block discarded – undo
553 553
 
554 554
         if ($confirm) {
555 555
             if (!$faqHandler->delete($faqObj)) {
556
-                redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR . Smartfaq\Utility::formatErrors($faqObj->getErrors()));
556
+                redirect_header('faq.php', 2, _AM_SF_FAQ_DELETE_ERROR.Smartfaq\Utility::formatErrors($faqObj->getErrors()));
557 557
             }
558 558
 
559 559
             redirect_header('faq.php', 2, sprintf(_AM_SF_ARTISDELETED, $faqObj->question()));
560 560
         } else {
561 561
             // no confirm: show deletion condition
562
-            $faqid =  Request::getInt('faqid', 0, 'POST');
562
+            $faqid = Request::getInt('faqid', 0, 'POST');
563 563
             xoops_cp_header();
564 564
             xoops_confirm([
565 565
                               'op'      => 'del',
566 566
                               'faqid'   => $faqObj->faqid(),
567 567
                               'confirm' => 1,
568 568
                               'name'    => $faqObj->question()
569
-                          ], 'faq.php', _AM_SF_DELETETHISARTICLE . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
569
+                          ], 'faq.php', _AM_SF_DELETETHISARTICLE." <br>'".$faqObj->question()."'. <br> <br>", _AM_SF_DELETE);
570 570
             xoops_cp_footer();
571 571
         }
572 572
 
@@ -580,10 +580,10 @@  discard block
 block discarded – undo
580 580
 
581 581
         $adminObject->displayNavigation(basename(__FILE__));
582 582
 
583
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
584
-        require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
583
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
584
+        require_once XOOPS_ROOT_PATH.'/class/pagenav.php';
585 585
 
586
-        require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/displayfaqs.php';
586
+        require_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/displayfaqs.php';
587 587
 
588 588
         $totalcategories = $categoryHandler->getCategoriesCount(-1);
589 589
         if ($totalcategories > 0) {
@@ -593,4 +593,4 @@  discard block
 block discarded – undo
593 593
         break;
594 594
 }
595 595
 
596
-require_once __DIR__ . '/admin_footer.php';
596
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/mygrouppermform.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
      * Add appendix
121 121
      *
122 122
      * @access public
123
-     * @param $permName
123
+     * @param string $permName
124 124
      * @param $itemId
125
-     * @param $itemName
125
+     * @param string $itemName
126 126
      */
127 127
     public function addAppendix($permName, $itemId, $itemName)
128 128
     {
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     /**
257 257
      * Constructor
258 258
      * @param      $caption
259
-     * @param      $name
259
+     * @param      string $name
260 260
      * @param      $groupId
261 261
      * @param null $values
262 262
      */
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -379,20 +379,20 @@
 block discarded – undo
379 379
             $tree .= ' checked';
380 380
         }
381 381
         $tree .= '>'
382
-                 . $option['name']
383
-                 . '<input type="hidden" name="'
384
-                 . $this->getName()
385
-                 . '[parents]['
386
-                 . $option['id']
387
-                 . ']" value="'
388
-                 . implode(':', $parentIds)
389
-                 . '"><input type="hidden" name="'
390
-                 . $this->getName()
391
-                 . '[itemname]['
392
-                 . $option['id']
393
-                 . ']" value="'
394
-                 . htmlspecialchars($option['name'], ENT_QUOTES)
395
-                 . "\"><br>\n";
382
+                    . $option['name']
383
+                    . '<input type="hidden" name="'
384
+                    . $this->getName()
385
+                    . '[parents]['
386
+                    . $option['id']
387
+                    . ']" value="'
388
+                    . implode(':', $parentIds)
389
+                    . '"><input type="hidden" name="'
390
+                    . $this->getName()
391
+                    . '[itemname]['
392
+                    . $option['id']
393
+                    . ']" value="'
394
+                    . htmlspecialchars($option['name'], ENT_QUOTES)
395
+                    . "\"><br>\n";
396 396
         if (isset($option['children'])) {
397 397
             foreach ($option['children'] as $child) {
398 398
                 array_push($parentIds, $option['id']);
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
 
25 25
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
26 26
 
27
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php';
28
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php';
29
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhiddentoken.php';
30
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php';
31
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php';
32
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/form.php';
27
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php';
28
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php';
29
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhiddentoken.php';
30
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php';
31
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php';
32
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/form.php';
33 33
 
34 34
 /**
35 35
  * Renders a form for setting module specific group permissions
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         //      $this->XoopsForm($title, 'groupperm_form', XOOPS_URL.'/modules/system/admin/groupperm.php', 'post'); GIJ
82 82
         parent::__construct($title, 'groupperm_form', '', 'post');
83
-        $this->_modid    = (int)$modid;
83
+        $this->_modid    = (int) $modid;
84 84
         $this->_permName = $permname;
85 85
         $this->_permDesc = $permdesc;
86 86
         $this->addElement(new \XoopsFormHidden('modid', $this->_modid));
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
         }
160 160
         $gpermHandler  = xoops_getHandler('groupperm');
161 161
         $memberHandler = xoops_getHandler('member');
162
-        $glist         =& $memberHandler->getGroupList();
162
+        $glist         = & $memberHandler->getGroupList();
163 163
         foreach (array_keys($glist) as $i) {
164 164
             // get selected item id(s) for each group
165 165
             $selected = $gpermHandler->getItemIds($this->_permName, $i, $this->_modid);
166
-            $ele      = new MyXoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected);
166
+            $ele      = new MyXoopsGroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected);
167 167
             $ele->setOptionTree($this->_itemTree);
168 168
 
169 169
             foreach ($this->_appendix as $key => $append) {
@@ -190,18 +190,18 @@  discard block
 block discarded – undo
190 190
         $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
191 191
         $this->addElement($tray);
192 192
 
193
-        $ret      = '<h4>' . $this->getTitle() . '</h4>' . $this->_permDesc . '<br>';
194
-        $ret      .= "<form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "'" . $this->getExtra() . ">\n<table width='100%' class='outer' cellspacing='1'>\n";
195
-        $elements =& $this->getElements();
193
+        $ret      = '<h4>'.$this->getTitle().'</h4>'.$this->_permDesc.'<br>';
194
+        $ret .= "<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table width='100%' class='outer' cellspacing='1'>\n";
195
+        $elements = & $this->getElements();
196 196
         foreach (array_keys($elements) as $i) {
197 197
             if (!is_object($elements[$i])) {
198 198
                 $ret .= $elements[$i];
199 199
             } elseif (!$elements[$i]->isHidden()) {
200
-                $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption();
200
+                $ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption();
201 201
                 if ('' != $elements[$i]->getDescription()) {
202
-                    $ret .= '<br><br><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>';
202
+                    $ret .= '<br><br><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>';
203 203
                 }
204
-                $ret .= "</td>\n<td class='even'>\n" . $elements[$i]->render() . "\n</td></tr>\n";
204
+                $ret .= "</td>\n<td class='even'>\n".$elements[$i]->render()."\n</td></tr>\n";
205 205
             } else {
206 206
                 $ret .= $elements[$i]->render();
207 207
             }
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      */
288 288
     public function setOptionTree(&$optionTree)
289 289
     {
290
-        $this->_optionTree =& $optionTree;
290
+        $this->_optionTree = & $optionTree;
291 291
     }
292 292
 
293 293
     /**
@@ -312,34 +312,34 @@  discard block
 block discarded – undo
312 312
         $ret = '';
313 313
 
314 314
         if (count($this->_appendix) > 0) {
315
-            $ret  .= '<table class="outer"><tr>';
315
+            $ret .= '<table class="outer"><tr>';
316 316
             $cols = 1;
317 317
             foreach ($this->_appendix as $append) {
318 318
                 if ($cols > 4) {
319
-                    $ret  .= '</tr><tr>';
319
+                    $ret .= '</tr><tr>';
320 320
                     $cols = 1;
321 321
                 }
322 322
                 $checked = $append['selected'] ? 'checked' : '';
323
-                $name    = 'perms[' . $append['permname'] . ']';
323
+                $name    = 'perms['.$append['permname'].']';
324 324
                 $itemid  = $append['itemid'];
325 325
                 $itemid  = $append['itemid'];
326
-                $ret     .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked>{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\"><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\"><br></td>";
326
+                $ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked>{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\"><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\"><br></td>";
327 327
                 ++$cols;
328 328
             }
329 329
             $ret .= '</tr></table>';
330 330
         }
331 331
 
332
-        $ret  .= '<table class="outer"><tr>';
332
+        $ret .= '<table class="outer"><tr>';
333 333
         $cols = 1;
334 334
         foreach ($this->_optionTree[0]['children'] as $topitem) {
335 335
             if ($cols > 4) {
336
-                $ret  .= '</tr><tr>';
336
+                $ret .= '</tr><tr>';
337 337
                 $cols = 1;
338 338
             }
339 339
             $tree   = '<td class="odd">';
340 340
             $prefix = '';
341 341
             $this->renderOptionTree($tree, $this->_optionTree[$topitem], $prefix);
342
-            $ret .= $tree . '</td>';
342
+            $ret .= $tree.'</td>';
343 343
             ++$cols;
344 344
         }
345 345
         $ret .= '</tr></table>';
@@ -358,21 +358,21 @@  discard block
 block discarded – undo
358 358
      */
359 359
     private function renderOptionTree(&$tree, $option, $prefix, $parentIds = [])
360 360
     {
361
-        $tree .= $prefix . '<input type="checkbox" name="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" onclick="';
361
+        $tree .= $prefix.'<input type="checkbox" name="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" id="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" onclick="';
362 362
         // If there are parent elements, add javascript that will
363 363
         // make them selecteded when this element is checked to make
364 364
         // sure permissions to parent items are added as well.
365 365
         foreach ($parentIds as $pid) {
366
-            $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']';
367
-            $tree       .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if (ele.checked !== true) {ele.checked = this.checked;}";
366
+            $parent_ele = $this->getName().'[groups]['.$this->_groupId.']['.$pid.']';
367
+            $tree .= "var ele = xoopsGetElementById('".$parent_ele."'); if (ele.checked !== true) {ele.checked = this.checked;}";
368 368
         }
369 369
         // If there are child elements, add javascript that will
370 370
         // make them unchecked when this element is unchecked to make
371 371
         // sure permissions to child items are not added when there
372 372
         // is no permission to this item.
373 373
         foreach ($option['allchild'] as $cid) {
374
-            $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']';
375
-            $tree      .= "var ele = xoopsGetElementById('" . $child_ele . "'); if (this.checked !== true) {ele.checked = false;}";
374
+            $child_ele = $this->getName().'[groups]['.$this->_groupId.']['.$cid.']';
375
+            $tree .= "var ele = xoopsGetElementById('".$child_ele."'); if (this.checked !== true) {ele.checked = false;}";
376 376
         }
377 377
         $tree .= '" value="1"';
378 378
         if (null !== $this->_value && in_array($option['id'], $this->_value)) {
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         if (isset($option['children'])) {
397 397
             foreach ($option['children'] as $child) {
398 398
                 array_push($parentIds, $option['id']);
399
-                $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix . '&nbsp;-', $parentIds);
399
+                $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix.'&nbsp;-', $parentIds);
400 400
             }
401 401
         }
402 402
     }
Please login to merge, or discard this patch.
admin/question.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 $startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0;
27 27
 
28 28
 /**
29
- * @param bool $showmenu
29
+ * @param string $showmenu
30 30
  * @param int  $faqid
31 31
  */
32 32
 function editfaq($showmenu = false, $faqid = -1)
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -284,11 +284,11 @@
 block discarded – undo
284 284
             $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0;
285 285
             xoops_cp_header();
286 286
             xoops_confirm([
287
-                              'op'      => 'del',
288
-                              'faqid'   => $faqObj->faqid(),
289
-                              'confirm' => 1,
290
-                              'name'    => $faqObj->question()
291
-                          ], 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
287
+                                'op'      => 'del',
288
+                                'faqid'   => $faqObj->faqid(),
289
+                                'confirm' => 1,
290
+                                'name'    => $faqObj->question()
291
+                            ], 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
292 292
             xoops_cp_footer();
293 293
         }
294 294
 
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 use XoopsModules\Smartfaq;
10 10
 use XoopsModules\Smartfaq\Constants;
11 11
 
12
-require_once __DIR__ . '/admin_header.php';
12
+require_once __DIR__.'/admin_header.php';
13 13
 
14 14
 global $xoopsUser;
15 15
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 }
31 31
 
32 32
 // Where shall we start?
33
-$startfaq = isset($_GET['startfaq']) ? (int)$_GET['startfaq'] : 0;
33
+$startfaq = isset($_GET['startfaq']) ? (int) $_GET['startfaq'] : 0;
34 34
 
35 35
 /**
36 36
  * @param bool $showmenu
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 {
41 41
     global $faqHandler, $categoryHandler, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModuleConfig, $xoopsModule, $XOOPS_URL, $myts;
42 42
 
43
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
43
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
44 44
     // If there is a parameter, and the id exists, retrieve data: we're editing a faq
45 45
     if (-1 != $faqid) {
46 46
         // Creating the FAQ object
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 
73 73
         echo "<br>\n";
74 74
         Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon');
75
-        echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a>&nbsp;" . $collapsableBar_title . '</h3>';
75
+        echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a>&nbsp;".$collapsableBar_title.'</h3>';
76 76
         echo "<div id='bottomtable'>";
77
-        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . $collapsableBar_info . '</span>';
77
+        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.$collapsableBar_info.'</span>';
78 78
     } else {
79 79
         // there's no parameter, so we're adding a faq
80 80
         $faqObj = $faqHandler->create();
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $button_caption    = _AM_SF_CREATE;
86 86
 
87 87
         Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon');
88
-        echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a>&nbsp;" . _AM_SF_CREATEQUESTION . '</h3>';
88
+        echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a>&nbsp;"._AM_SF_CREATEQUESTION.'</h3>';
89 89
         echo "<div id='bottomtable'>";
90 90
     }
91 91
     $sform = new \XoopsThemeForm(_AM_SF_OPEN_QUESTION, 'op', xoops_getenv('PHP_SELF'), 'post', true);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $button_tray->addElement($butt_create);
160 160
 
161 161
         $butt_edit = new \XoopsFormButton('', '', _AM_SF_OPEN_QUESTION_EDIT, 'button');
162
-        $butt_edit->setExtra("onclick=\"location='faq.php?op=mod&amp;faqid=" . $faqid . "'\"");
162
+        $butt_edit->setExtra("onclick=\"location='faq.php?op=mod&amp;faqid=".$faqid."'\"");
163 163
         $button_tray->addElement($butt_edit);
164 164
 
165 165
         $butt_cancel = new \XoopsFormButton('', '', _AM_SF_CANCEL, 'button');
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         xoops_cp_header();
192 192
 
193 193
         $adminObject->displayNavigation(basename(__FILE__));
194
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
194
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
195 195
 
196 196
         editfaq(true, $faqid);
197 197
         break;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             $uid = $xoopsUser->uid();
208 208
         }
209 209
 
210
-        $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : -1;
210
+        $faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : -1;
211 211
 
212 212
         // Creating the FAQ
213 213
         if (-1 != $faqid) {
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
 
219 219
         // Putting the values in the FAQ object
220 220
         $faqObj->setGroups_read(isset($_POST['groups']) ? $_POST['groups'] : []);
221
-        $faqObj->setVar('categoryid', isset($_POST['categoryid']) ? (int)$_POST['categoryid'] : 0);
221
+        $faqObj->setVar('categoryid', isset($_POST['categoryid']) ? (int) $_POST['categoryid'] : 0);
222 222
         $faqObj->setVar('question', $_POST['question']);
223
-        $faqObj->setVar('status', isset($_POST['status']) ? (int)$_POST['status'] : Constants::SF_STATUS_ASKED);
223
+        $faqObj->setVar('status', isset($_POST['status']) ? (int) $_POST['status'] : Constants::SF_STATUS_ASKED);
224 224
 
225 225
         $notifToDo = null;
226 226
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
         // Storing the FAQ
254 254
         if (!$faqObj->store()) {
255
-            redirect_header('javascript:history.go(-1)', 3, _AM_SF_ERROR . Smartfaq\Utility::formatErrors($faqObj->getErrors()));
255
+            redirect_header('javascript:history.go(-1)', 3, _AM_SF_ERROR.Smartfaq\Utility::formatErrors($faqObj->getErrors()));
256 256
         }
257 257
 
258 258
         // Send notifications
@@ -270,8 +270,8 @@  discard block
 block discarded – undo
270 270
         $module_id    = $xoopsModule->getVar('mid');
271 271
         $gpermHandler = xoops_getHandler('groupperm');
272 272
 
273
-        $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : 0;
274
-        $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : $faqid;
273
+        $faqid = isset($_POST['faqid']) ? (int) $_POST['faqid'] : 0;
274
+        $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : $faqid;
275 275
 
276 276
         $faqObj = new Smartfaq\Faq($faqid);
277 277
 
@@ -286,14 +286,14 @@  discard block
 block discarded – undo
286 286
             redirect_header('question.php', 2, sprintf(_AM_SF_QUESTIONISDELETED, $faqObj->question()));
287 287
         } else {
288 288
             // no confirm: show deletion condition
289
-            $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0;
289
+            $faqid = isset($_GET['faqid']) ? (int) $_GET['faqid'] : 0;
290 290
             xoops_cp_header();
291 291
             xoops_confirm([
292 292
                               'op'      => 'del',
293 293
                               'faqid'   => $faqObj->faqid(),
294 294
                               'confirm' => 1,
295 295
                               'name'    => $faqObj->question()
296
-                          ], 'question.php', _AM_SF_DELETETHISQUESTION . " <br>'" . $faqObj->question() . "'. <br> <br>", _AM_SF_DELETE);
296
+                          ], 'question.php', _AM_SF_DELETETHISQUESTION." <br>'".$faqObj->question()."'. <br> <br>", _AM_SF_DELETE);
297 297
             xoops_cp_footer();
298 298
         }
299 299
 
@@ -306,8 +306,8 @@  discard block
 block discarded – undo
306 306
         xoops_cp_header();
307 307
         $adminObject->displayNavigation(basename(__FILE__));
308 308
 
309
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
310
-        require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
309
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
310
+        require_once XOOPS_ROOT_PATH.'/class/pagenav.php';
311 311
 
312 312
         global  $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $smartModuleConfig;
313 313
 
@@ -315,9 +315,9 @@  discard block
 block discarded – undo
315 315
 
316 316
         Smartfaq\Utility::collapsableBar('toptable', 'toptableicon');
317 317
 
318
-        echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a>&nbsp;" . _AM_SF_OPENED_TITLE . '</h3>';
318
+        echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a>&nbsp;"._AM_SF_OPENED_TITLE.'</h3>';
319 319
         echo "<div id='toptable'>";
320
-        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_OPENED_DSC . '</span>';
320
+        echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_OPENED_DSC.'</span>';
321 321
 
322 322
         // Get the total number of published FAQs
323 323
         $totalfaqs = $faqHandler->getFaqsCount(-1, [Constants::SF_STATUS_OPENED]);
@@ -327,14 +327,14 @@  discard block
 block discarded – undo
327 327
         $allCats         = $categoryHandler->getObjects(null, true);
328 328
         echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>";
329 329
         echo '<tr>';
330
-        echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_ARTID . '</b></td>';
331
-        echo "<th width='20%' class='bg3' align='left'><b>" . _AM_SF_ARTCOLNAME . '</b></td>';
332
-        echo "<th class='bg3' align='left'><b>" . _AM_SF_QUESTION . '</b></td>';
330
+        echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_ARTID.'</b></td>';
331
+        echo "<th width='20%' class='bg3' align='left'><b>"._AM_SF_ARTCOLNAME.'</b></td>';
332
+        echo "<th class='bg3' align='left'><b>"._AM_SF_QUESTION.'</b></td>';
333 333
 
334
-        echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>';
334
+        echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>';
335 335
 
336
-        echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>';
337
-        echo "<th width='60' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>';
336
+        echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>';
337
+        echo "<th width='60' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>';
338 338
         echo '</tr>';
339 339
         //var_dump( $faqsObj);
340 340
         if ($totalfaqs > 0) {
@@ -342,33 +342,33 @@  discard block
 block discarded – undo
342 342
             foreach (array_keys($faqsObj) as $i) {
343 343
                 $categoryObj = $allCats[$faqsObj[$i]->categoryid()];
344 344
 
345
-                $modify = "<a href='question.php?op=mod&amp;faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_EDITART . "' alt='" . _AM_SF_EDITART . "'></a>";
346
-                $delete = "<a href='question.php?op=del&amp;faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>";
345
+                $modify = "<a href='question.php?op=mod&amp;faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_EDITART."' alt='"._AM_SF_EDITART."'></a>";
346
+                $delete = "<a href='question.php?op=del&amp;faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>";
347 347
 
348 348
                 $requester = Smartfaq\Utility::getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']);
349 349
 
350 350
                 echo '<tr>';
351
-                echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . '</td>';
352
-                echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>';
353
-                echo "<td class='even' align='left'><a href='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/answer.php?faqid=' . $faqsObj[$i]->faqid() . "'>" . $faqsObj[$i]->question(100) . '</a></td>';
351
+                echo "<td class='head' align='center'>".$faqsObj[$i]->faqid().'</td>';
352
+                echo "<td class='even' align='left'>".$categoryObj->name().'</td>';
353
+                echo "<td class='even' align='left'><a href='".XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/answer.php?faqid='.$faqsObj[$i]->faqid()."'>".$faqsObj[$i]->question(100).'</a></td>';
354 354
 
355
-                echo "<td class='even' align='center'>" . $requester . '</td>';
355
+                echo "<td class='even' align='center'>".$requester.'</td>';
356 356
 
357
-                echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . '</td>';
357
+                echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s').'</td>';
358 358
                 echo "<td class='even' align='center'> $modify $delete </td>";
359 359
                 echo '</tr>';
360 360
             }
361 361
         } else {
362 362
             $faqid = -1;
363 363
             echo '<tr>';
364
-            echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOQUEUED . '</td>';
364
+            echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOQUEUED.'</td>';
365 365
             echo '</tr>';
366 366
         }
367 367
         echo "</table>\n";
368 368
         echo "<br>\n";
369 369
 
370 370
         $pagenav = new \XoopsPageNav($totalfaqs, $xoopsModuleConfig['perpage'], $startfaq, 'startfaq');
371
-        echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>';
371
+        echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>';
372 372
         echo '</div>';
373 373
 
374 374
         $totalcategories = $categoryHandler->getCategoriesCount(-1);
@@ -379,4 +379,4 @@  discard block
 block discarded – undo
379 379
         break;
380 380
 }
381 381
 
382
-require_once __DIR__ . '/admin_footer.php';
382
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
language/english/main.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
 define('_MD_SF_SPECIFIC_URL_SELECT', 'Specific URL...');
133 133
 define('_MD_SF_SENDSTORY', 'Send this Q&amp;A to a friend');
134 134
 define('_MD_SF_SPECIFIC_URL', 'Specific URL');
135
-define('_MD_SF_SPECIFIC_URL_DSC', "If you have set the 'Contextually link to this module' to <i>" . _MD_SF_SPECIFIC_URL_SELECT . "</i>, please specify the URL.<br>\n<b>Example :</b> modules/newbb");
135
+define('_MD_SF_SPECIFIC_URL_DSC', "If you have set the 'Contextually link to this module' to <i>"._MD_SF_SPECIFIC_URL_SELECT."</i>, please specify the URL.<br>\n<b>Example :</b> modules/newbb");
136 136
 define('_MD_SF_SUB_INTRO', 'please fill this form to send your Q&amp;A. The site administrator will review it and then publish it as soon as possible. Thank you in advance for your contribution.');
137 137
 define('_MD_SF_SUB_SNEWNAME', 'Submit a Q&amp;A');
138 138
 define('_MD_SF_SUB_SMNAME', 'Submit a Q&amp;A');
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 define('_MD_SF_MAINHEAD', 'Welcome to the');
77 77
 define(
78 78
     '_MD_SF_MAININTRO',
79
-       "In this area of the site, you will find the answers to the frequently asked questions. Each Q&amp;A is placed in a category for easier finding. This is the section from where the random Q&amp;As in the right column of the site come from. Should you not find the answer to a particular question, don't hesitate to <a href='"
80
-       . XOOPS_URL
81
-       . "/forms/askus/form.php'>Ask us a Question!</a>"
79
+        "In this area of the site, you will find the answers to the frequently asked questions. Each Q&amp;A is placed in a category for easier finding. This is the section from where the random Q&amp;As in the right column of the site come from. Should you not find the answer to a particular question, don't hesitate to <a href='"
80
+        . XOOPS_URL
81
+        . "/forms/askus/form.php'>Ask us a Question!</a>"
82 82
 );
83 83
 define('_MD_SF_MAINNOSELECTCAT', 'You did not select a valid category');
84 84
 define('_MD_SF_MAINNOFAQS', 'There are no Q&amp;As in this category');
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 define('_MD_SF_REQUEST_ERROR', 'An error occured. Your request was not sent.');
121 121
 define(
122 122
     '_MD_SF_REQUEST_INTRO',
123
-       'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'
123
+        'You did not find the answer to the question you were looking for? No problem! Simply fill the following form in order to request the answer for a new question. The site administrator will review your request and publish this new question in the Open Questions section for someone to answer it!'
124 124
 );
125 125
 define('_MD_SF_REQUEST_RECEIVED_NEED_APPROVAL', 'Your request has been sent and will be published in the Open Questions section upon approval by a moderator.<br>Thank you for your contribution!');
126 126
 define('_MD_SF_REQUEST_RECEIVED_AND_PUBLISHED', 'Your request has been sent and automatically published in the Open Questions section. Thank you for your contribution!');
Please login to merge, or discard this patch.
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.
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.
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.
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.
admin/permissions.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -59,14 +59,14 @@
 block discarded – undo
59 59
             echo $form_view->render();
60 60
         } else {
61 61
             echo "<img id='toptableicon' src="
62
-                 . XOOPS_URL
63
-                 . '/modules/'
64
-                 . $xoopsModule->dirname()
65
-                 . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
66
-                 . _AM_SF_PERMISSIONSVIEWMAN
67
-                 . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
68
-                 . _AM_SF_NOPERMSSET
69
-                 . '</span>';
62
+                    . XOOPS_URL
63
+                    . '/modules/'
64
+                    . $xoopsModule->dirname()
65
+                    . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
66
+                    . _AM_SF_PERMISSIONSVIEWMAN
67
+                    . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
68
+                    . _AM_SF_NOPERMSSET
69
+                    . '</span>';
70 70
         }
71 71
         echo '</div>';
72 72
 
Please login to merge, or discard this patch.
Switch Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -26,53 +26,53 @@
 block discarded – undo
26 26
 }
27 27
 
28 28
 switch ($op) {
29
-    case 'default':
30
-    default:
31
-        global $xoopsDB, $xoopsModule;
29
+        case 'default':
30
+        default:
31
+            global $xoopsDB, $xoopsModule;
32 32
 
33
-        $adminObject = \Xmf\Module\Admin::getInstance();
34
-        xoops_cp_header();
35
-        $adminObject->displayNavigation(basename(__FILE__));
36
-        // View Categories permissions
37
-        $item_list_view = [];
38
-        $block_view     = [];
39
-        // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ;
40
-        Smartfaq\Utility::collapsableBar('toptable', 'toptableicon');
33
+            $adminObject = \Xmf\Module\Admin::getInstance();
34
+            xoops_cp_header();
35
+            $adminObject->displayNavigation(basename(__FILE__));
36
+            // View Categories permissions
37
+            $item_list_view = [];
38
+            $block_view     = [];
39
+            // echo "<h3 style='color: #2F5376; '>"._AM_SF_PERMISSIONSADMIN."</h3>\n" ;
40
+            Smartfaq\Utility::collapsableBar('toptable', 'toptableicon');
41 41
 
42
-        $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' ');
43
-        if ($xoopsDB->getRowsNum($result_view)) {
44
-            while ($myrow_view = $xoopsDB->fetchArray($result_view)) {
45
-                $item_list_view['cid']   = $myrow_view['categoryid'];
46
-                $item_list_view['title'] = $myrow_view['name'];
47
-                $form_view               = new \XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src="
48
-                                                                                                                    . XOOPS_URL
49
-                                                                                                                    . '/modules/'
50
-                                                                                                                    . $xoopsModule->dirname()
51
-                                                                                                                    . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
52
-                                                                                                                    . _AM_SF_PERMISSIONSVIEWMAN
53
-                                                                                                                    . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
54
-                                                                                                                    . _AM_SF_VIEW_CATS
55
-                                                                                                                    . '</span>', 'admin/permissions.php');
56
-                $block_view[]            = $item_list_view;
57
-                foreach ($block_view as $itemlists) {
58
-                    $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title']));
42
+            $result_view = $xoopsDB->query('SELECT categoryid, name FROM ' . $xoopsDB->prefix('smartfaq_categories') . ' ');
43
+            if ($xoopsDB->getRowsNum($result_view)) {
44
+                while ($myrow_view = $xoopsDB->fetchArray($result_view)) {
45
+                    $item_list_view['cid']   = $myrow_view['categoryid'];
46
+                    $item_list_view['title'] = $myrow_view['name'];
47
+                    $form_view               = new \XoopsGroupPermForm('', $xoopsModule->getVar('mid'), 'category_read', "<img id='toptableicon' src="
48
+                                                                                                                        . XOOPS_URL
49
+                                                                                                                        . '/modules/'
50
+                                                                                                                        . $xoopsModule->dirname()
51
+                                                                                                                        . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
52
+                                                                                                                        . _AM_SF_PERMISSIONSVIEWMAN
53
+                                                                                                                        . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
54
+                                                                                                                        . _AM_SF_VIEW_CATS
55
+                                                                                                                        . '</span>', 'admin/permissions.php');
56
+                    $block_view[]            = $item_list_view;
57
+                    foreach ($block_view as $itemlists) {
58
+                        $form_view->addItem($itemlists['cid'], $myts->displayTarea($itemlists['title']));
59
+                    }
59 60
                 }
61
+                echo $form_view->render();
62
+            } else {
63
+                echo "<img id='toptableicon' src="
64
+                     . XOOPS_URL
65
+                     . '/modules/'
66
+                     . $xoopsModule->dirname()
67
+                     . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
68
+                     . _AM_SF_PERMISSIONSVIEWMAN
69
+                     . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
70
+                     . _AM_SF_NOPERMSSET
71
+                     . '</span>';
60 72
             }
61
-            echo $form_view->render();
62
-        } else {
63
-            echo "<img id='toptableicon' src="
64
-                 . XOOPS_URL
65
-                 . '/modules/'
66
-                 . $xoopsModule->dirname()
67
-                 . "/assets/images/icon/close12.gif alt=''></a>&nbsp;"
68
-                 . _AM_SF_PERMISSIONSVIEWMAN
69
-                 . "</h3><div id='toptable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">"
70
-                 . _AM_SF_NOPERMSSET
71
-                 . '</span>';
72
-        }
73
-        echo '</div>';
73
+            echo '</div>';
74 74
 
75
-        echo "<br>\n";
75
+            echo "<br>\n";
76 76
 }
77 77
 
78 78
 require_once __DIR__ . '/admin_footer.php';
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  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 14
 if (!Smartfaq\Utility::userIsAdmin()) {
15 15
     redirect_header('javascript:history.go(-1)', 1, _NOPERM);
@@ -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 ($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.