Passed
Push — master ( db4789...a75458 )
by Goffy
02:49
created
class/Common/ServerStats.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $html .= '<ul>';
46 46
 
47 47
         $gdlib = \function_exists('gd_info') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
48
-        $html  .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
48
+        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
49 49
         if (\function_exists('gd_info')) {
50 50
             if (true === ($gdlib = gd_info())) {
51 51
                 $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         //    $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
60 60
 
61 61
         $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
62
-        $html      .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
62
+        $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
63 63
 
64 64
         $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('upload_max_filesize') . '</span></b>';
65 65
         $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('post_max_size') . '</span></b>';
Please login to merge, or discard this patch.
class/Common/FilesManagement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                 self::rrmdir($fObj->getPathname());
208 208
             }
209 209
         }
210
-        $iterator = null;   // clear iterator Obj to close file/directory
210
+        $iterator = null; // clear iterator Obj to close file/directory
211 211
         return \rmdir($src); // remove the directory & return results
212 212
     }
213 213
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
                 //                \rmdir($fObj->getPath()); // now delete the directory
248 248
             }
249 249
         }
250
-        $iterator = null;   // clear iterator Obj to close file/directory
250
+        $iterator = null; // clear iterator Obj to close file/directory
251 251
         return \rmdir($src); // remove the directory & return results
252 252
     }
253 253
 
Please login to merge, or discard this patch.
admin/header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 
24 24
 require \dirname(__DIR__) . '/preloads/autoloader.php';
25 25
 
26
-require_once \dirname(__DIR__, 3). '/include/cp_header.php';
26
+require_once \dirname(__DIR__, 3) . '/include/cp_header.php';
27 27
 $thisPath = \dirname(__DIR__);
28
-include_once $thisPath.'/include/common.php';
28
+include_once $thisPath . '/include/common.php';
29 29
 $sysPathIcon16 = '../' . $xoopsModule->getInfo('sysicons16');
30 30
 $sysPathIcon32 = '../' . $xoopsModule->getInfo('sysicons32');
31 31
 $pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 $helper->loadLanguage('modinfo');
59 59
 $helper->loadLanguage('common');
60 60
 // Local admin menu class
61
-include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
61
+include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php');
62 62
 
63 63
 xoops_cp_header();
64 64
 $adminMenu = new ModuleAdmin();
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
  * return object
28 28
  */
29 29
 
30
-$moduleDirName  = \basename(\dirname(__DIR__));
31
-$moduleDirNameUpper  = \mb_strtoupper($moduleDirName);
30
+$moduleDirName = \basename(\dirname(__DIR__));
31
+$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
32 32
 return (object)[
33 33
     'name'           => \mb_strtoupper($moduleDirName) . ' Module Configurator',
34 34
     'paths'          => [
Please login to merge, or discard this patch.
include/functions.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
  */
28 28
 function wgsitenotice_block_addCatSelect($cats) {
29 29
     $cat_sql = '';
30
-    if(\is_array($cats))
30
+    if (\is_array($cats))
31 31
     {
32
-        $cat_sql = '('.current($cats);
32
+        $cat_sql = '(' . current($cats);
33 33
         \array_shift($cats);
34
-        foreach($cats as $cat)
34
+        foreach ($cats as $cat)
35 35
         {
36
-            $cat_sql .= ','.$cat;
36
+            $cat_sql .= ',' . $cat;
37 37
         }
38 38
         $cat_sql .= ')';
39 39
     }
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 {
45 45
     global $xoopsTpl, $xoTheme;
46 46
     $myts = MyTextSanitizer::getInstance();
47
-    $content= $myts->undoHtmlSpecialChars($myts->displayTarea($content));
48
-    if(isset($xoTheme) && \is_object($xoTheme)) {
49
-        $xoTheme->addMeta( 'meta', 'keywords', \strip_tags($content));
47
+    $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content));
48
+    if (isset($xoTheme) && \is_object($xoTheme)) {
49
+        $xoTheme->addMeta('meta', 'keywords', \strip_tags($content));
50 50
     } else {    // Compatibility for old Xoops versions
51 51
         $xoopsTpl->assign('xoops_meta_keywords', \strip_tags($content));
52 52
     }
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
     global $xoopsTpl, $xoTheme;
58 58
     $myts = MyTextSanitizer::getInstance();
59 59
     $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content));
60
-    if(isset($xoTheme) && \is_object($xoTheme)) {
61
-        $xoTheme->addMeta( 'meta', 'description', \strip_tags($content));
60
+    if (isset($xoTheme) && \is_object($xoTheme)) {
61
+        $xoTheme->addMeta('meta', 'description', \strip_tags($content));
62 62
     } else {    // Compatibility for old Xoops versions
63 63
         $xoopsTpl->assign('xoops_meta_description', \strip_tags($content));
64 64
     }
Please login to merge, or discard this patch.
admin/contents.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                 $GLOBALS['xoopsTpl']->append('contents_list', $cont);
89 89
                 unset($cont);
90 90
             }
91
-            if ( $contents_rows > $limit ) {
91
+            if ($contents_rows > $limit) {
92 92
                 include_once \XOOPS_ROOT_PATH . '/class/pagenav.php';
93 93
                 $pagenav = new \XoopsPageNav($contents_rows, $limit, $start, 'start', 'op=list&limit=' . $limit);
94 94
                 $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $GLOBALS['xoopsTpl']->assign('form', $form->render());
109 109
     break;
110 110
     case 'save':
111
-        if ( !$GLOBALS['xoopsSecurity']->check() ) {
111
+        if (!$GLOBALS['xoopsSecurity']->check()) {
112 112
            \redirect_header('contents.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
113 113
         }
114 114
         if (isset($cont_id)) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $contentsObj->setVar('cont_header', Request::getString('cont_header'));
124 124
         // Set Var cont_text
125 125
         //fix for avoid hiding empty paragraphs in some browsers (instead of: $contentsObj->setVar('cont_weight', $_POST['cont_weight']);
126
-        $cont_text =  Request::getString('cont_text', '', 'default', 2);
126
+        $cont_text = Request::getString('cont_text', '', 'default', 2);
127 127
         $contentsObj->setVar('cont_text', \preg_replace('/<p><\/p>/', '<p>&nbsp;</p>', $cont_text));
128 128
         // Set Var cont_weight
129 129
         $contentsObj->setVar('cont_weight', Request::getInt('cont_weight'));
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     case 'delete':
153 153
         $contentsObj = $contentsHandler->get($cont_id);
154 154
         if (\isset($_REQUEST['ok']) && 1 == (int)$_REQUEST['ok']) {
155
-            if ( !$GLOBALS['xoopsSecurity']->check() ) {
155
+            if (!$GLOBALS['xoopsSecurity']->check()) {
156 156
                 \redirect_header('contents.php', 3, \implode(', ', $GLOBALS['xoopsSecurity']->getErrors()));
157 157
             }
158 158
             if ($contentsHandler->delete($contentsObj)) {
@@ -167,9 +167,9 @@  discard block
 block discarded – undo
167 167
 
168 168
     case 'order':
169 169
         $corder = Request::getArray('corder');
170
-        for ($i = 0, $iMax = \count($corder); $i < $iMax; $i++){
170
+        for ($i = 0, $iMax = \count($corder); $i < $iMax; $i++) {
171 171
             $contentsObj = $contentsHandler->get($corder[$i]);
172
-            $contentsObj->setVar('cont_weight',$i+1);
172
+            $contentsObj->setVar('cont_weight', $i + 1);
173 173
             $contentsHandler->insert($contentsObj);
174 174
         }
175 175
         break;
Please login to merge, or discard this patch.
admin/versions.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 $version_id = Request::getInt('version_id');
29 29
 $start      = Request::getInt('start');
30 30
 
31
-$img_yes = "<img src='../".$modPathIcon16."/on.png' >";
32
-$img_no  = "<img src='../".$modPathIcon16."/off.png' >";
31
+$img_yes = "<img src='../" . $modPathIcon16 . "/on.png' >";
32
+$img_no  = "<img src='../" . $modPathIcon16 . "/off.png' >";
33 33
 // Switch options
34 34
 switch ($op)
35 35
 {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 $GLOBALS['xoopsTpl']->append('versions_list', $version);
77 77
                 unset($version);
78 78
             }
79
-            if ( $versions_rows > $limit ) {
79
+            if ($versions_rows > $limit) {
80 80
                 include_once \XOOPS_ROOT_PATH . '/class/pagenav.php';
81 81
                 $pagenav = new \XoopsPageNav($versions_rows, $limit, $start, 'start', 'op=list&limit=' . $limit);
82 82
                 $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $GLOBALS['xoopsTpl']->assign('form', $form->render());
100 100
     break;
101 101
     case 'save':
102
-        if ( !$GLOBALS['xoopsSecurity']->check() ) {
102
+        if (!$GLOBALS['xoopsSecurity']->check()) {
103 103
            \redirect_header('versions.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
104 104
         }
105 105
         if (isset($version_id)) {
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             $versionsObj->setVar('version_current', $version_current);
143 143
             // Insert Data
144 144
             if ($versionsHandler->insert($versionsObj)) {
145
-               \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK);
145
+               \redirect_header('versions.php?op=list&start=' . $start, 2, \_AM_WGSITENOTICE_FORMOK);
146 146
             }
147 147
         }
148 148
     break;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $versionsObj->setVar('version_online', $version_online);
156 156
             // Insert Data
157 157
             if ($versionsHandler->insert($versionsObj)) {
158
-               \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK);
158
+               \redirect_header('versions.php?op=list&start=' . $start, 2, \_AM_WGSITENOTICE_FORMOK);
159 159
             }
160 160
         }
161 161
     break;
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     case 'delete':
174 174
         $versionsObj = $versionsHandler->get($version_id);
175 175
         if (isset($_REQUEST['ok']) && 1 == (int)$_REQUEST['ok']) {
176
-            if ( !$GLOBALS['xoopsSecurity']->check() ) {
176
+            if (!$GLOBALS['xoopsSecurity']->check()) {
177 177
                 \redirect_header('versions.php', 3, \implode(', ', $GLOBALS['xoopsSecurity']->getErrors()));
178 178
             }
179 179
 
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
 
196 196
     case 'order':
197 197
         $vorder = Request::getArray('vorder');
198
-        for ($i = 0, $iMax = \count($vorder); $i < $iMax; $i++){
198
+        for ($i = 0, $iMax = \count($vorder); $i < $iMax; $i++) {
199 199
             $versionsObj = $versionsHandler->get($vorder[$i]);
200
-            $versionsObj->setVar('version_weight',$i+1);
200
+            $versionsObj->setVar('version_weight', $i + 1);
201 201
             $versionsHandler->insert($versionsObj);
202 202
         }
203 203
         break;
Please login to merge, or discard this patch.
admin/menu.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @author          Goffy (xoops.wedega.com) - Email:<[email protected]> - Website:<https://xoops.wedega.com>
20 20
  */
21 21
 
22
-$dirname = \basename( \dirname(__DIR__) ) ;
22
+$dirname = \basename(\dirname(__DIR__));
23 23
 $moduleDirNameUpper = \mb_strtoupper($dirname);
24 24
 $moduleHandler = \xoops_getHandler('module');
25 25
 $xoopsModule = \XoopsModule::getByDirname($dirname);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 $adminmenu[] = [
30 30
     'title' => \_MI_WGSITENOTICE_ADMENU1,
31 31
     'link'  => 'admin/index.php',
32
-    'icon'  => $sysPathIcon32.'/dashboard.png'
32
+    'icon'  => $sysPathIcon32 . '/dashboard.png'
33 33
 ];
34 34
 $adminmenu[] = [
35 35
     'title' => \_MI_WGSITENOTICE_ADMENU2,
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 require_once \dirname(__DIR__, 2) . '/mainfile.php';
27 27
 $dirname = $GLOBALS['xoopsModule']->getVar('dirname');
28
-$pathname = \XOOPS_ROOT_PATH. '/modules/'.$dirname;
28
+$pathname = \XOOPS_ROOT_PATH . '/modules/' . $dirname;
29 29
 include_once $pathname . '/include/common.php';
30 30
 // Get instance of module
31 31
 $helper = Helper::getInstance();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 //
39 39
 $myts = MyTextSanitizer::getInstance();
40 40
 $style = \WGSITENOTICE_URL . '/assets/css/style.css';
41
-if(\file_exists($style)) { return true; }
41
+if (\file_exists($style)) { return true; }
42 42
 //
43 43
 $sysPathIcon16 = $GLOBALS['xoopsModule']->getInfo('sysicons16');
44 44
 $sysPathIcon32 = $GLOBALS['xoopsModule']->getInfo('sysicons32');
Please login to merge, or discard this patch.