Passed
Push — master ( 2744eb...81ba93 )
by Michael
02:46
created
preloads/autoloader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * @see http://www.php-fig.org/psr/psr-4/examples/
5 5
  */
6
-spl_autoload_register(function ($class) {
6
+spl_autoload_register(function($class) {
7 7
     // project-specific namespace prefix
8
-    $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__)));
8
+    $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__)));
9 9
 
10 10
     // base directory for the namespace prefix
11
-    $base_dir = __DIR__ . '/../class/';
11
+    $base_dir = __DIR__.'/../class/';
12 12
 
13 13
     // does the class use the namespace prefix?
14 14
     $len      = strlen($prefix);
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     // replace the namespace prefix with the base directory, replace namespace
24 24
     // separators with directory separators in the relative class name, append
25 25
     // with .php
26
-    $file           = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
26
+    $file = $base_dir.str_replace('\\', '/', $relative_class).'.php';
27 27
 
28 28
     // if the file exists, require it
29 29
     if (file_exists($file)) {
Please login to merge, or discard this patch.
preloads/core.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
      */
29 29
     public static function eventCoreIncludeCommonEnd($args)
30 30
     {
31
-        include __DIR__ . '/autoloader.php';
31
+        include __DIR__.'/autoloader.php';
32 32
     }
33 33
 }
Please login to merge, or discard this patch.
admin/admin_header.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Smartfaq;
21 21
 
22
-require_once __DIR__ . '/../../../include/cp_header.php';
22
+require_once __DIR__.'/../../../include/cp_header.php';
23 23
 //require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');
24 24
 
25 25
 // require_once __DIR__ . '/../class/Utility.php';
@@ -28,18 +28,18 @@  discard block
 block discarded – undo
28 28
 $moduleDirName = basename(dirname(__DIR__));
29 29
 
30 30
 $path = dirname(dirname(dirname(__DIR__)));
31
-require_once $path . '/kernel/module.php';
32
-require_once $path . '/class/xoopstree.php';
33
-require_once $path . '/class/xoopslists.php';
34
-require_once $path . '/class/pagenav.php';
35
-require_once $path . '/class/xoopsformloader.php';
31
+require_once $path.'/kernel/module.php';
32
+require_once $path.'/class/xoopstree.php';
33
+require_once $path.'/class/xoopslists.php';
34
+require_once $path.'/class/pagenav.php';
35
+require_once $path.'/class/xoopsformloader.php';
36 36
 
37 37
 //require_once __DIR__ . '/../include/functions.php';
38 38
 // require_once __DIR__ . '/../class/category.php';
39 39
 // require_once __DIR__ . '/../class/faq.php';
40 40
 // require_once __DIR__ . '/../class/answer.php';
41 41
 // require_once __DIR__ . '/../class/Utility.php';
42
-require_once __DIR__ . '/../include/common.php';
42
+require_once __DIR__.'/../include/common.php';
43 43
 /** @var Smartfaq\Helper $helper */
44 44
 $helper      = Smartfaq\Helper::getInstance();
45 45
 $adminObject = \Xmf\Module\Admin::getInstance();
Please login to merge, or discard this patch.
admin/admin.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -28,42 +28,42 @@  discard block
 block discarded – undo
28 28
 if (empty($fct)) {
29 29
     $fct = 'preferences';
30 30
 }
31
-include __DIR__ . '/../../../mainfile.php';
32
-include XOOPS_ROOT_PATH . '/include/cp_functions.php';
31
+include __DIR__.'/../../../mainfile.php';
32
+include XOOPS_ROOT_PATH.'/include/cp_functions.php';
33 33
 
34
-require_once XOOPS_ROOT_PATH . '/kernel/module.php';
34
+require_once XOOPS_ROOT_PATH.'/kernel/module.php';
35 35
 
36 36
 $admintest = 0;
37 37
 
38 38
 if (is_object($xoopsUser)) {
39 39
     $xoopsModule = XoopsModule::getByDirname('system');
40 40
     if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
41
-        redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
41
+        redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM);
42 42
     }
43 43
     $admintest = 1;
44 44
 } else {
45
-    redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
45
+    redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM);
46 46
 }
47 47
 
48 48
 // include system category definitions
49
-require_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
49
+require_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
50 50
 $error = false;
51 51
 if (0 != $admintest) {
52 52
     if (isset($fct) && '' != $fct) {
53
-        if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) {
53
+        if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php')) {
54 54
             xoops_loadLanguage('admin', 'system');
55
-            xoops_loadLanguage('admin/' . $fct, 'system');
55
+            xoops_loadLanguage('admin/'.$fct, 'system');
56 56
 
57
-            include XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php';
57
+            include XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php';
58 58
             $syspermHandler = xoops_getHandler('groupperm');
59 59
             $category       = !empty($modversion['category']) ? (int)$modversion['category'] : 0;
60 60
             unset($modversion);
61 61
             if ($category > 0) {
62
-                $groups =& $xoopsUser->getGroups();
62
+                $groups = & $xoopsUser->getGroups();
63 63
                 if (in_array(XOOPS_GROUP_ADMIN, $groups)
64 64
                     || false !== $syspermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) {
65 65
                     if (file_exists("../include/{$fct}.inc.php")) {
66
-                        require_once __DIR__ . "/../include/{$fct}.inc.php";
66
+                        require_once __DIR__."/../include/{$fct}.inc.php";
67 67
                     } else {
68 68
                         $error = true;
69 69
                     }
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
                     $error = true;
72 72
                 }
73 73
             } elseif ('version' === $fct) {
74
-                if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) {
75
-                    require_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php';
74
+                if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php')) {
75
+                    require_once XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php';
76 76
                 } else {
77 77
                     $error = true;
78 78
                 }
@@ -92,26 +92,26 @@  discard block
 block discarded – undo
92 92
     echo '<h4>System Configuration</h4>';
93 93
     echo '<table class="outer" cellpadding="4" cellspacing="1">';
94 94
     echo '<tr>';
95
-    $groups =& $xoopsUser->getGroups();
95
+    $groups = & $xoopsUser->getGroups();
96 96
     $all_ok = false;
97 97
     if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
98 98
         $syspermHandler = xoops_getHandler('groupperm');
99
-        $ok_syscats     =& $syspermHandler->getItemIds('system_admin', $groups);
99
+        $ok_syscats     = & $syspermHandler->getItemIds('system_admin', $groups);
100 100
     } else {
101 101
         $all_ok = true;
102 102
     }
103
-    $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin';
103
+    $admin_dir = XOOPS_ROOT_PATH.'/modules/system/admin';
104 104
     $handle    = opendir($admin_dir);
105 105
     $counter   = 0;
106 106
     $class     = 'even';
107 107
     while ($file = readdir($handle)) {
108
-        if ('cvs' !== strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) {
109
-            include $admin_dir . '/' . $file . '/xoops_version.php';
108
+        if ('cvs' !== strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir.'/'.$file)) {
109
+            include $admin_dir.'/'.$file.'/xoops_version.php';
110 110
             if ($modversion['hasAdmin']) {
111 111
                 $category = isset($modversion['category']) ? (int)$modversion['category'] : 0;
112 112
                 if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) {
113 113
                     echo "<td class='$class' align='center' valign='bottom' width='19%'>";
114
-                    echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n";
114
+                    echo "<a href='".XOOPS_URL.'/modules/system/admin.php?fct='.$file."'><b>".trim($modversion['name'])."</b></a>\n";
115 115
                     echo '</td>';
116 116
                     ++$counter;
117 117
                     $class = ('even' === $class) ? 'odd' : 'even';
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         }
127 127
     }
128 128
     while ($counter < 5) {
129
-        echo '<td class="' . $class . '">&nbsp;</td>';
129
+        echo '<td class="'.$class.'">&nbsp;</td>';
130 130
         $class = ('even' === $class) ? 'odd' : 'even';
131 131
         ++$counter;
132 132
     }
Please login to merge, or discard this patch.
admin/mygrouppermform.php 1 patch
Spacing   +28 added lines, -28 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
@@ -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.
class/Faq.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         if (0 != $maxLength) {
188 188
             if (!XOOPS_USE_MULTIBYTES) {
189 189
                 if (strlen($ret) >= $maxLength) {
190
-                    $ret = substr($ret, 0, $maxLength - 1) . '...';
190
+                    $ret = substr($ret, 0, $maxLength - 1).'...';
191 191
                 }
192 192
             }
193 193
         }
@@ -379,14 +379,14 @@  discard block
 block discarded – undo
379 379
                 $theAnswers = $answerHandler->getAllAnswers($this->faqid(), Constants::SF_AN_STATUS_APPROVED, 1, 0);
380 380
                 //echo "test";
381 381
                 //exit;
382
-                $this->answer =& $theAnswers[0];
382
+                $this->answer = & $theAnswers[0];
383 383
                 break;
384 384
 
385 385
             case Constants::SF_STATUS_ANSWERED:
386 386
                 $theAnswers = $answerHandler->getAllAnswers($this->faqid(), Constants::SF_AN_STATUS_PROPOSED, 1, 0);
387 387
                 //echo "test";
388 388
                 //exit;
389
-                $this->answer =& $theAnswers[0];
389
+                $this->answer = & $theAnswers[0];
390 390
                 break;
391 391
 
392 392
             case Constants::SF_STATUS_PUBLISHED:
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
         $tags['MODULE_NAME']   = $myts->displayTarea($smartModule->getVar('name'));
473 473
         $tags['FAQ_NAME']      = $this->question();
474 474
         $tags['CATEGORY_NAME'] = $this->getCategoryName();
475
-        $tags['CATEGORY_URL']  = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/category.php?categoryid=' . $this->categoryid();
475
+        $tags['CATEGORY_URL']  = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/category.php?categoryid='.$this->categoryid();
476 476
         $tags['FAQ_QUESTION']  = $this->question();
477 477
         $answerObj             = $this->answer();
478 478
         if (is_object($answerObj)) {
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
         foreach ($notifications as $notification) {
485 485
             switch ($notification) {
486 486
                 case Constants::SF_NOT_FAQ_PUBLISHED:
487
-                    $tags['FAQ_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/faq.php?faqid=' . $this->faqid();
487
+                    $tags['FAQ_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/faq.php?faqid='.$this->faqid();
488 488
 
489 489
                     $notificationHandler->triggerEvent('global_faq', 0, 'published', $tags);
490 490
                     $notificationHandler->triggerEvent('category_faq', $this->categoryid(), 'published', $tags);
@@ -492,20 +492,20 @@  discard block
 block discarded – undo
492 492
                     break;
493 493
 
494 494
                 case Constants::SF_NOT_FAQ_SUBMITTED:
495
-                    $tags['WAITINGFILES_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/admin/faq.php?faqid=' . $this->faqid();
495
+                    $tags['WAITINGFILES_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/admin/faq.php?faqid='.$this->faqid();
496 496
                     $notificationHandler->triggerEvent('global_faq', 0, 'submitted', $tags);
497 497
                     $notificationHandler->triggerEvent('category_faq', $this->categoryid(), 'submitted', $tags);
498 498
                     break;
499 499
 
500 500
                 case Constants::SF_NOT_QUESTION_PUBLISHED:
501
-                    $tags['FAQ_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/answer.php?faqid=' . $this->faqid();
501
+                    $tags['FAQ_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/answer.php?faqid='.$this->faqid();
502 502
                     $notificationHandler->triggerEvent('global_question', 0, 'published', $tags);
503 503
                     $notificationHandler->triggerEvent('category_question', $this->categoryid(), 'published', $tags);
504 504
                     $notificationHandler->triggerEvent('question', $this->faqid(), 'approved', $tags);
505 505
                     break;
506 506
 
507 507
                 case Constants::SF_NOT_QUESTION_SUBMITTED:
508
-                    $tags['WAITINGFILES_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/admin/question.php?op=mod&faqid=' . $this->faqid();
508
+                    $tags['WAITINGFILES_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/admin/question.php?op=mod&faqid='.$this->faqid();
509 509
                     $notificationHandler->triggerEvent('global_question', 0, 'submitted', $tags);
510 510
                     $notificationHandler->triggerEvent('category_question', $this->categoryid(), 'submitted', $tags);
511 511
                     break;
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
                     break;
516 516
 
517 517
                 case Constants::SF_NOT_NEW_ANSWER_PROPOSED:
518
-                    $tags['WAITINGFILES_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/admin/answer.php?op=mod&faqid=' . $this->faqid();
518
+                    $tags['WAITINGFILES_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/admin/answer.php?op=mod&faqid='.$this->faqid();
519 519
                     $notificationHandler->triggerEvent('global_faq', 0, 'answer_proposed', $tags);
520 520
                     $notificationHandler->triggerEvent('category_faq', $this->categoryid(), 'answer_proposed', $tags);
521 521
                     break;
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
             $text = _MD_SF_FAQCOMEFROM;
630 630
         }
631 631
 
632
-        return $text . $xoopsConfig['sitename'] . ' : <a href=' . XOOPS_URL . '/modules/smartfaq/faq.php?faqid=' . $this->faqid() . '>' . XOOPS_URL . '/modules/smartfaq/faq.php?faqid=' . $this->faqid() . '</a>';
632
+        return $text.$xoopsConfig['sitename'].' : <a href='.XOOPS_URL.'/modules/smartfaq/faq.php?faqid='.$this->faqid().'>'.XOOPS_URL.'/modules/smartfaq/faq.php?faqid='.$this->faqid().'</a>';
633 633
     }
634 634
 
635 635
     /**
@@ -648,9 +648,9 @@  discard block
 block discarded – undo
648 648
         $faq['question']   = $this->question();
649 649
         $page              = (Constants::SF_STATUS_OPENED == $this->status()) ? 'answer.php' : 'faq.php';
650 650
 
651
-        $faq['questionlink'] = "<a href='$page?faqid=" . $this->faqid() . "'>" . $this->question($lastfaqsize) . '</a>';
651
+        $faq['questionlink'] = "<a href='$page?faqid=".$this->faqid()."'>".$this->question($lastfaqsize).'</a>';
652 652
         if ($linkInQuestion) {
653
-            $faq['fullquestionlink'] = "<a href='$page?faqid=" . $this->faqid() . "'>" . $this->question() . '</a>';
653
+            $faq['fullquestionlink'] = "<a href='$page?faqid=".$this->faqid()."'>".$this->question().'</a>';
654 654
         } else {
655 655
             $faq['fullquestionlink'] = $this->question();
656 656
         }
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
                 $categoryObj = $category[$this->categoryid()];
667 667
             }
668 668
             $faq['categoryname'] = $categoryObj->getVar('name');
669
-            $faq['categorylink'] = "<a href='" . XOOPS_URL . '/modules/smartfaq/category.php?categoryid=' . $this->categoryid() . "'>" . $categoryObj->getVar('name') . '</a>';
669
+            $faq['categorylink'] = "<a href='".XOOPS_URL.'/modules/smartfaq/category.php?categoryid='.$this->categoryid()."'>".$categoryObj->getVar('name').'</a>';
670 670
         }
671 671
 
672 672
         return $faq;
Please login to merge, or discard this patch.
class/GroupPermForm.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
 
28 28
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
29 29
 
30
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php';
31
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php';
32
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhiddentoken.php';
33
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php';
34
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php';
35
-require_once XOOPS_ROOT_PATH . '/class/xoopsform/form.php';
30
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php';
31
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php';
32
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhiddentoken.php';
33
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php';
34
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php';
35
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/form.php';
36 36
 
37 37
 /**
38 38
  * Renders a form for setting module specific group permissions
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
         }
163 163
         $gpermHandler  = xoops_getHandler('groupperm');
164 164
         $memberHandler = xoops_getHandler('member');
165
-        $glist         =& $memberHandler->getGroupList();
165
+        $glist         = & $memberHandler->getGroupList();
166 166
         foreach (array_keys($glist) as $i) {
167 167
             // get selected item id(s) for each group
168 168
             $selected = $gpermHandler->getItemIds($this->_permName, $i, $this->_modid);
169
-            $ele      = new Smartfaq\GroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected);
169
+            $ele      = new Smartfaq\GroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected);
170 170
             $ele->setOptionTree($this->_itemTree);
171 171
 
172 172
             foreach ($this->_appendix as $key => $append) {
@@ -193,18 +193,18 @@  discard block
 block discarded – undo
193 193
         $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
194 194
         $this->addElement($tray);
195 195
 
196
-        $ret      = '<h4>' . $this->getTitle() . '</h4>' . $this->_permDesc . '<br>';
197
-        $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";
198
-        $elements =& $this->getElements();
196
+        $ret      = '<h4>'.$this->getTitle().'</h4>'.$this->_permDesc.'<br>';
197
+        $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";
198
+        $elements = & $this->getElements();
199 199
         foreach (array_keys($elements) as $i) {
200 200
             if (!is_object($elements[$i])) {
201 201
                 $ret .= $elements[$i];
202 202
             } elseif (!$elements[$i]->isHidden()) {
203
-                $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption();
203
+                $ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption();
204 204
                 if ('' != $elements[$i]->getDescription()) {
205
-                    $ret .= '<br><br><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>';
205
+                    $ret .= '<br><br><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>';
206 206
                 }
207
-                $ret .= "</td>\n<td class='even'>\n" . $elements[$i]->render() . "\n</td></tr>\n";
207
+                $ret .= "</td>\n<td class='even'>\n".$elements[$i]->render()."\n</td></tr>\n";
208 208
             } else {
209 209
                 $ret .= $elements[$i]->render();
210 210
             }
Please login to merge, or discard this patch.
include/config.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,25 +22,25 @@  discard block
 block discarded – undo
22 22
     $moduleDirName      = basename(dirname(__DIR__));
23 23
     $moduleDirNameUpper = strtoupper($moduleDirName);
24 24
     return (object)[
25
-        'name'           => strtoupper($moduleDirName) . ' Module Configurator',
25
+        'name'           => strtoupper($moduleDirName).' Module Configurator',
26 26
         'paths'          => [
27 27
             'dirname'    => $moduleDirName,
28
-            'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
29
-            'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
30
-            'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
31
-            'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
32
-            'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
28
+            'admin'      => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
29
+            'modPath'    => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
30
+            'modUrl'     => XOOPS_URL.'/modules/'.$moduleDirName,
31
+            'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
32
+            'uploadUrl'  => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
33 33
         ],
34 34
         'uploadFolders'  => [
35
-            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
36
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category',
37
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots',
35
+            constant($moduleDirNameUpper.'_UPLOAD_PATH'),
36
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/category',
37
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/screenshots',
38 38
             //XOOPS_UPLOAD_PATH . '/flags'
39 39
         ],
40 40
         'copyBlankFiles' => [
41
-            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
42
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category',
43
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots',
41
+            constant($moduleDirNameUpper.'_UPLOAD_PATH'),
42
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/category',
43
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/screenshots',
44 44
             //XOOPS_UPLOAD_PATH . '/flags'
45 45
         ],
46 46
 
@@ -75,6 +75,6 @@  discard block
 block discarded – undo
75 75
             '/images',
76 76
         ],
77 77
         'modCopyright'    => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
78
-                     <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>',
78
+                     <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG').'\' alt=\'XOOPS Project\' /></a>',
79 79
     ];
80 80
 }
Please login to merge, or discard this patch.
class/SmartobjectDbupdater.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@
 block discarded – undo
61 61
         $query = sprintf('ALTER TABLE `%s` RENAME %s', $from, $to);
62 62
         $ret   = $xoopsDB->queryF($query);
63 63
         if (!$ret) {
64
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from) . '<br>';
64
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from).'<br>';
65 65
 
66 66
             return false;
67 67
         } else {
68
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_RENAME_TABLE, $from, $to) . '<br>';
68
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_RENAME_TABLE, $from, $to).'<br>';
69 69
 
70 70
             return true;
71 71
         }
Please login to merge, or discard this patch.