Completed
Push — master ( 454ebd...de22fe )
by Michael
03:58
created
blocks/faqs_most_viewed.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     /** @var \XoopsModules\Smartfaq\FaqHandler $faqHandler */
35 35
     $faqHandler = \XoopsModules\Smartfaq\Helper::getInstance()->getHandler('Faq');
36 36
     // creating the FAQ objects that belong to the selected category
37
-    $faqsObj   = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort);
37
+    $faqsObj = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort);
38 38
 
39 39
     if ($faqsObj) {
40 40
         foreach ($faqsObj as $iValue) {
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 
61 61
     $form = Smartfaq\Utility::createCategorySelect($options[0]);
62 62
 
63
-    $form .= '&nbsp;<br>' . _MB_SF_DISP . "&nbsp;<input type='text' name='options[]' value='" . $options[1] . "'>&nbsp;" . _MB_SF_FAQS . '';
64
-    $form .= '&nbsp;<br>' . _MB_SF_CHARS . "&nbsp;<input type='text' name='options[]' value='" . $options[2] . "'>&nbsp;" . _MB_SF_LENGTH . '';
63
+    $form .= '&nbsp;<br>'._MB_SF_DISP."&nbsp;<input type='text' name='options[]' value='".$options[1]."'>&nbsp;"._MB_SF_FAQS.'';
64
+    $form .= '&nbsp;<br>'._MB_SF_CHARS."&nbsp;<input type='text' name='options[]' value='".$options[2]."'>&nbsp;"._MB_SF_LENGTH.'';
65 65
 
66 66
     return $form;
67 67
 }
Please login to merge, or discard this patch.
blocks/faqs_recent.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         }
63 63
 
64 64
         $memberHandler = xoops_getHandler('member');
65
-        $users         = $memberHandler->getUsers(new \Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true);
65
+        $users         = $memberHandler->getUsers(new \Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true);
66 66
         foreach ($faqsObj as $iValue) {
67 67
             $faqs['categoryid']   = $iValue->categoryid();
68 68
             $faqs['question']     = $iValue->question($maxQuestionLength);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $block['lang_poster']   = _MB_SF_ANSWEREDBY;
85 85
         $block['lang_date']     = _MB_SF_DATE;
86 86
         $modulename             = $myts->htmlSpecialChars($smartModule->getVar('name'));
87
-        $block['lang_visitfaq'] = _MB_SF_VISITFAQ . ' ' . $modulename;
87
+        $block['lang_visitfaq'] = _MB_SF_VISITFAQ.' '.$modulename;
88 88
     }
89 89
 
90 90
     return $block;
@@ -100,30 +100,30 @@  discard block
 block discarded – undo
100 100
 
101 101
     $form = Smartfaq\Utility::createCategorySelect($options[0]);
102 102
 
103
-    $form .= '&nbsp;<br>' . _MB_SF_ORDER . "&nbsp;<select name='options[]'>";
103
+    $form .= '&nbsp;<br>'._MB_SF_ORDER."&nbsp;<select name='options[]'>";
104 104
 
105 105
     $form .= "<option value='datesub'";
106 106
     if ('datesub' === $options[1]) {
107 107
         $form .= ' selected';
108 108
     }
109
-    $form .= '>' . _MB_SF_DATE . "</option>\n";
109
+    $form .= '>'._MB_SF_DATE."</option>\n";
110 110
 
111 111
     $form .= "<option value='counter'";
112 112
     if ('counter' === $options[1]) {
113 113
         $form .= ' selected';
114 114
     }
115
-    $form .= '>' . _MB_SF_HITS . "</option>\n";
115
+    $form .= '>'._MB_SF_HITS."</option>\n";
116 116
 
117 117
     $form .= "<option value='weight'";
118 118
     if ('weight' === $options[1]) {
119 119
         $form .= ' selected';
120 120
     }
121
-    $form .= '>' . _MB_SF_WEIGHT . "</option>\n";
121
+    $form .= '>'._MB_SF_WEIGHT."</option>\n";
122 122
 
123 123
     $form .= "</select>\n";
124 124
 
125
-    $form .= '&nbsp;' . _MB_SF_DISP . "&nbsp;<input type='text' name='options[]' value='" . $options[2] . "'>&nbsp;" . _MB_SF_FAQS . '';
126
-    $form .= '&nbsp;<br>' . _MB_SF_CHARS . "&nbsp;<input type='text' name='options[]' value='" . $options[3] . "'>&nbsp;" . _MB_SF_LENGTH . '';
125
+    $form .= '&nbsp;'._MB_SF_DISP."&nbsp;<input type='text' name='options[]' value='".$options[2]."'>&nbsp;"._MB_SF_FAQS.'';
126
+    $form .= '&nbsp;<br>'._MB_SF_CHARS."&nbsp;<input type='text' name='options[]' value='".$options[3]."'>&nbsp;"._MB_SF_LENGTH.'';
127 127
 
128 128
     return $form;
129 129
 }
Please login to merge, or discard this patch.
blocks/faqs_context.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     $faqHandler = \XoopsModules\Smartfaq\Helper::getInstance()->getHandler('Faq');
29 29
 
30 30
     // creating the FAQ objects that belong to the selected category
31
-    $faqsObj   = $faqHandler->getContextualFaqs($limit);
31
+    $faqsObj = $faqHandler->getContextualFaqs($limit);
32 32
 
33 33
     if ($faqsObj) {
34 34
         foreach ($faqsObj as $iValue) {
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
  */
49 49
 function b_faqs_context_edit($options)
50 50
 {
51
-    $form = '' . _MB_SF_DISP . '&nbsp;';
52
-    $form .= "<input type='text' name='options[]' value='" . $options[0] . "'>&nbsp;" . _MB_SF_FAQS . '';
51
+    $form = ''._MB_SF_DISP.'&nbsp;';
52
+    $form .= "<input type='text' name='options[]' value='".$options[0]."'>&nbsp;"._MB_SF_FAQS.'';
53 53
 
54 54
     return $form;
55 55
 }
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.
class/Helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     {
72 72
         $ret   = false;
73 73
         $db    = \XoopsDatabaseFactory::getDatabaseConnection();
74
-        $class = '\\XoopsModules\\' . ucfirst(strtolower(basename(dirname(__DIR__)))) . '\\' . $name . 'Handler';
74
+        $class = '\\XoopsModules\\'.ucfirst(strtolower(basename(dirname(__DIR__)))).'\\'.$name.'Handler';
75 75
         $ret   = new $class($db);
76 76
         return $ret;
77 77
     }
Please login to merge, or discard this patch.
class/Uploader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
14 14
 
15
-require_once XOOPS_ROOT_PATH . '/class/uploader.php';
15
+require_once XOOPS_ROOT_PATH.'/class/uploader.php';
16 16
 
17 17
 /**
18 18
  * Class Uploader
Please login to merge, or discard this patch.
class/GroupPermForm.php 1 patch
Spacing   +15 added lines, -15 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
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         //      $this->XoopsForm($title, 'groupperm_form', XOOPS_URL.'/modules/system/admin/groupperm.php', 'post'); GIJ
85 85
         parent::__construct($title, 'groupperm_form', '', 'post');
86
-        $this->_modid    = (int)$modid;
86
+        $this->_modid    = (int) $modid;
87 87
         $this->_permName = $permname;
88 88
         $this->_permDesc = $permdesc;
89 89
         $this->addElement(new \XoopsFormHidden('modid', $this->_modid));
@@ -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.
class/Common/Configurator.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  *
21 21
  */
22 22
 
23
-require_once __DIR__ . '/../../include/common.php';
23
+require_once __DIR__.'/../../include/common.php';
24 24
 
25 25
 /**
26 26
  * Class Configurator
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 class Configurator
29 29
 {
30 30
     public $uploadFolders   = [];
31
-    public $blankFiles  = [];
31
+    public $blankFiles = [];
32 32
     public $templateFolders = [];
33 33
     public $oldFiles        = [];
34 34
     public $oldFolders      = [];
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
         $capsDirName          = strtoupper($moduleDirName);
44 44
         $this->name           = 'Module Configurator';
45 45
         $this->uploadFolders  = [
46
-            constant($capsDirName . '_UPLOAD_PATH'),
47
-            constant($capsDirName . '_UPLOAD_PATH') . '/content',
48
-            constant($capsDirName . '_UPLOAD_PATH') . '/images',
49
-            constant($capsDirName . '_UPLOAD_PATH') . '/images/category',
50
-            constant($capsDirName . '_UPLOAD_PATH') . '/images/thumbnails',
46
+            constant($capsDirName.'_UPLOAD_PATH'),
47
+            constant($capsDirName.'_UPLOAD_PATH').'/content',
48
+            constant($capsDirName.'_UPLOAD_PATH').'/images',
49
+            constant($capsDirName.'_UPLOAD_PATH').'/images/category',
50
+            constant($capsDirName.'_UPLOAD_PATH').'/images/thumbnails',
51 51
         ];
52 52
         $this->blankFiles = [
53
-            constant($capsDirName . '_UPLOAD_PATH'),
54
-            constant($capsDirName . '_UPLOAD_PATH') . '/images/category',
55
-            constant($capsDirName . '_UPLOAD_PATH') . '/images/thumbnails',
53
+            constant($capsDirName.'_UPLOAD_PATH'),
54
+            constant($capsDirName.'_UPLOAD_PATH').'/images/category',
55
+            constant($capsDirName.'_UPLOAD_PATH').'/images/thumbnails',
56 56
         ];
57 57
 
58 58
         $this->templateFolders = [
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             '/templates/admin/'
62 62
 
63 63
         ];
64
-        $this->oldFiles        = [
64
+        $this->oldFiles = [
65 65
             '/class/request.php',
66 66
             '/class/registry.php',
67 67
             '/class/utilities.php',
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             '/include/functions.php',
71 71
             '/ajaxrating.txt'
72 72
         ];
73
-        $this->oldFolders      = [
73
+        $this->oldFolders = [
74 74
             '/images',
75 75
             '/css',
76 76
             '/js',
Please login to merge, or discard this patch.
class/Common/VersionChecks.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
         //check for minimum XOOPS version
38 38
         $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
39 39
         if (null === $requiredVer) {
40
-            $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
40
+            $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string
41 41
         }
42
-        $success     = true;
42
+        $success = true;
43 43
 
44 44
         if (version_compare($currentVer, $requiredVer, '<')) {
45
-            $success     = false;
46
-            $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
45
+            $success = false;
46
+            $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer));
47 47
         }
48 48
 
49 49
         return $success;
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
         // check for minimum PHP version
64 64
         $success = true;
65 65
         $verNum  = PHP_VERSION;
66
-        $reqVer  =& $module->getInfo('min_php');
66
+        $reqVer  = & $module->getInfo('min_php');
67 67
         if (false !== $reqVer && '' !== $reqVer) {
68 68
             if (version_compare($verNum, $reqVer, '<')) {
69
-                $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum));
69
+                $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum));
70 70
                 $success = false;
71 71
             }
72 72
         }
Please login to merge, or discard this patch.