Completed
Branch master (1b2f30)
by Michael
06:29 queued 03:22
created
comment_delete.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
 * Licence: GNU
8 8
 */
9 9
 
10
-include dirname(dirname(__DIR__)) . '/mainfile.php';
11
-include_once XOOPS_ROOT_PATH . '/include/comment_delete.php';
10
+include dirname(dirname(__DIR__)).'/mainfile.php';
11
+include_once XOOPS_ROOT_PATH.'/include/comment_delete.php';
Please login to merge, or discard this patch.
include/comment_functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 function smartfaq_com_update($faq_id, $total_num)
11 11
 {
12 12
     $db = &XoopsDatabaseFactory::getDatabaseConnection();
13
-    $sql = 'UPDATE ' . $db->prefix('smartfaq_faq') . ' SET comments = ' . $total_num . ' WHERE faqid = ' . $faq_id;
13
+    $sql = 'UPDATE '.$db->prefix('smartfaq_faq').' SET comments = '.$total_num.' WHERE faqid = '.$faq_id;
14 14
     $db->query($sql);
15 15
 }
16 16
 
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
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
 * Licence: GNU
8 8
 */
9 9
 
10
-include dirname(dirname(__DIR__)) . '/mainfile.php';
11
-include_once XOOPS_ROOT_PATH . '/include/comment_reply.php';
10
+include dirname(dirname(__DIR__)).'/mainfile.php';
11
+include_once XOOPS_ROOT_PATH.'/include/comment_reply.php';
Please login to merge, or discard this patch.
comment_post.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
 * Licence: GNU
8 8
 */
9 9
 
10
-include dirname(dirname(__DIR__)) . '/mainfile.php';
11
-include_once XOOPS_ROOT_PATH . '/include/comment_post.php';
10
+include dirname(dirname(__DIR__)).'/mainfile.php';
11
+include_once XOOPS_ROOT_PATH.'/include/comment_post.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
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
 * Licence: GNU
8 8
 */
9 9
 
10
-include dirname(dirname(__DIR__)) . '/mainfile.php';
11
-include_once XOOPS_ROOT_PATH . '/include/comment_edit.php';
10
+include dirname(dirname(__DIR__)).'/mainfile.php';
11
+include_once XOOPS_ROOT_PATH.'/include/comment_edit.php';
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
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
 * Licence: GNU
8 8
 */
9 9
 
10
-include dirname(dirname(__DIR__)) . '/mainfile.php';
11
-include XOOPS_ROOT_PATH . '/include/notification_update.php';
10
+include dirname(dirname(__DIR__)).'/mainfile.php';
11
+include XOOPS_ROOT_PATH.'/include/notification_update.php';
Please login to merge, or discard this patch.
comment_new.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
 * Licence: GNU
8 8
 */
9 9
 
10
-include dirname(dirname(__DIR__)) . '/mainfile.php';
11
-include_once XOOPS_ROOT_PATH . '/include/comment_new.php';
10
+include dirname(dirname(__DIR__)).'/mainfile.php';
11
+include_once XOOPS_ROOT_PATH.'/include/comment_new.php';
Please login to merge, or discard this patch.
admin/about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * @version    $Id $
19 19
  */
20 20
 
21
-include_once __DIR__ . '/admin_header.php';
21
+include_once __DIR__.'/admin_header.php';
22 22
 
23 23
 xoops_cp_header();
24 24
 
@@ -27,4 +27,4 @@  discard block
 block discarded – undo
27 27
 echo $aboutAdmin->addNavigation('about.php');
28 28
 echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
29 29
 
30
-include_once __DIR__ . '/admin_footer.php';
30
+include_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/mygrouppermform.php 2 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.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
 // ------------------------------------------------------------------------- //
38 38
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
39 39
 
40
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php';
41
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php';
42
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhiddentoken.php';
43
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php';
44
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php';
45
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/form.php';
40
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php';
41
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php';
42
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhiddentoken.php';
43
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php';
44
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php';
45
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/form.php';
46 46
 
47 47
 /**
48 48
  * Renders a form for setting module specific group permissions
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     {
94 94
         //      $this->XoopsForm($title, 'groupperm_form', XOOPS_URL.'/modules/system/admin/groupperm.php', 'post'); GIJ
95 95
         parent::__construct($title, 'groupperm_form', '', 'post');
96
-        $this->_modid    = (int)$modid;
96
+        $this->_modid    = (int) $modid;
97 97
         $this->_permName = $permname;
98 98
         $this->_permDesc = $permdesc;
99 99
         $this->addElement(new XoopsFormHidden('modid', $this->_modid));
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
         }
168 168
         $gpermHandler  = xoops_getHandler('groupperm');
169 169
         $memberHandler = xoops_getHandler('member');
170
-        $glist         =& $memberHandler->getGroupList();
170
+        $glist         = & $memberHandler->getGroupList();
171 171
         foreach (array_keys($glist) as $i) {
172 172
             // get selected item id(s) for each group
173 173
             $selected = $gpermHandler->getItemIds($this->_permName, $i, $this->_modid);
174
-            $ele      = new MyXoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected);
174
+            $ele      = new MyXoopsGroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected);
175 175
             $ele->setOptionTree($this->_itemTree);
176 176
 
177 177
             foreach ($this->_appendix as $key => $append) {
@@ -198,18 +198,18 @@  discard block
 block discarded – undo
198 198
         $tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
199 199
         $this->addElement($tray);
200 200
 
201
-        $ret = '<h4>' . $this->getTitle() . '</h4>' . $this->_permDesc . '<br />';
202
-        $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";
203
-        $elements =& $this->getElements();
201
+        $ret = '<h4>'.$this->getTitle().'</h4>'.$this->_permDesc.'<br />';
202
+        $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";
203
+        $elements = & $this->getElements();
204 204
         foreach (array_keys($elements) as $i) {
205 205
             if (!is_object($elements[$i])) {
206 206
                 $ret .= $elements[$i];
207 207
             } elseif (!$elements[$i]->isHidden()) {
208
-                $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption();
208
+                $ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption();
209 209
                 if ($elements[$i]->getDescription() != '') {
210
-                    $ret .= '<br /><br /><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>';
210
+                    $ret .= '<br /><br /><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>';
211 211
                 }
212
-                $ret .= "</td>\n<td class='even'>\n" . $elements[$i]->render() . "\n</td></tr>\n";
212
+                $ret .= "</td>\n<td class='even'>\n".$elements[$i]->render()."\n</td></tr>\n";
213 213
             } else {
214 214
                 $ret .= $elements[$i]->render();
215 215
             }
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
      */
296 296
     public function setOptionTree(&$optionTree)
297 297
     {
298
-        $this->_optionTree =& $optionTree;
298
+        $this->_optionTree = & $optionTree;
299 299
     }
300 300
 
301 301
     /**
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
                     $cols = 1;
329 329
                 }
330 330
                 $checked = $append['selected'] ? 'checked="checked"' : '';
331
-                $name    = 'perms[' . $append['permname'] . ']';
331
+                $name    = 'perms['.$append['permname'].']';
332 332
                 $itemid  = $append['itemid'];
333 333
                 $itemid  = $append['itemid'];
334 334
                 $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>";
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
             $tree   = '<td class="odd">';
348 348
             $prefix = '';
349 349
             $this->renderOptionTree($tree, $this->_optionTree[$topitem], $prefix);
350
-            $ret .= $tree . '</td>';
350
+            $ret .= $tree.'</td>';
351 351
             ++$cols;
352 352
         }
353 353
         $ret .= '</tr></table>';
@@ -366,31 +366,31 @@  discard block
 block discarded – undo
366 366
      */
367 367
     private function renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
368 368
     {
369
-        $tree .= $prefix . "<input type=\"checkbox\" name=\"" . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . "]\" id=\"" . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . "]\" onclick=\"";
369
+        $tree .= $prefix."<input type=\"checkbox\" name=\"".$this->getName().'[groups]['.$this->_groupId.']['.$option['id']."]\" id=\"".$this->getName().'[groups]['.$this->_groupId.']['.$option['id']."]\" onclick=\"";
370 370
         // If there are parent elements, add javascript that will
371 371
         // make them selecteded when this element is checked to make
372 372
         // sure permissions to parent items are added as well.
373 373
         foreach ($parentIds as $pid) {
374
-            $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']';
375
-            $tree .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if (ele.checked != true) {ele.checked = this.checked;}";
374
+            $parent_ele = $this->getName().'[groups]['.$this->_groupId.']['.$pid.']';
375
+            $tree .= "var ele = xoopsGetElementById('".$parent_ele."'); if (ele.checked != true) {ele.checked = this.checked;}";
376 376
         }
377 377
         // If there are child elements, add javascript that will
378 378
         // make them unchecked when this element is unchecked to make
379 379
         // sure permissions to child items are not added when there
380 380
         // is no permission to this item.
381 381
         foreach ($option['allchild'] as $cid) {
382
-            $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']';
383
-            $tree .= "var ele = xoopsGetElementById('" . $child_ele . "'); if (this.checked != true) {ele.checked = false;}";
382
+            $child_ele = $this->getName().'[groups]['.$this->_groupId.']['.$cid.']';
383
+            $tree .= "var ele = xoopsGetElementById('".$child_ele."'); if (this.checked != true) {ele.checked = false;}";
384 384
         }
385 385
         $tree .= '" value="1"';
386 386
         if (isset($this->_value) && in_array($option['id'], $this->_value)) {
387 387
             $tree .= ' checked="checked"';
388 388
         }
389
-        $tree .= ' />' . $option['name'] . "<input type=\"hidden\" name=\"" . $this->getName() . '[parents][' . $option['id'] . "]\" value=\"" . implode(':', $parentIds) . "\" /><input type=\"hidden\" name=\"" . $this->getName() . '[itemname][' . $option['id'] . "]\" value=\"" . htmlspecialchars($option['name']) . "\" /><br />\n";
389
+        $tree .= ' />'.$option['name']."<input type=\"hidden\" name=\"".$this->getName().'[parents]['.$option['id']."]\" value=\"".implode(':', $parentIds)."\" /><input type=\"hidden\" name=\"".$this->getName().'[itemname]['.$option['id']."]\" value=\"".htmlspecialchars($option['name'])."\" /><br />\n";
390 390
         if (isset($option['children'])) {
391 391
             foreach ($option['children'] as $child) {
392 392
                 array_push($parentIds, $option['id']);
393
-                $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix . '&nbsp;-', $parentIds);
393
+                $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix.'&nbsp;-', $parentIds);
394 394
             }
395 395
         }
396 396
     }
Please login to merge, or discard this patch.