Passed
Push — master ( 492cc7...e5a5fc )
by Michael
45s queued 11s
created
include/config.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,25 +35,25 @@  discard block
 block discarded – undo
35 35
 {
36 36
     $moduleDirName      = basename(dirname(__DIR__));
37 37
     $moduleDirNameUpper = strtoupper($moduleDirName);
38
-    return (object)[
39
-        'name'           => strtoupper($moduleDirName) . ' Module Configurator',
38
+    return (object) [
39
+        'name'           => strtoupper($moduleDirName).' Module Configurator',
40 40
         'paths'          => [
41 41
             'dirname'    => $moduleDirName,
42
-            'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
43
-            'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
44
-            'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
45
-            'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
46
-            'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
42
+            'admin'      => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
43
+            'modPath'    => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
44
+            'modUrl'     => XOOPS_URL.'/modules/'.$moduleDirName,
45
+            'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
46
+            'uploadUrl'  => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
47 47
         ],
48 48
         'uploadFolders'  => [
49
-            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
50
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/thumbs',
49
+            constant($moduleDirNameUpper.'_UPLOAD_PATH'),
50
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/thumbs',
51 51
 
52 52
             //XOOPS_UPLOAD_PATH . '/flags'
53 53
         ],
54 54
         'copyBlankFiles' => [
55
-            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
56
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/thumbs',
55
+            constant($moduleDirNameUpper.'_UPLOAD_PATH'),
56
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/thumbs',
57 57
             //XOOPS_UPLOAD_PATH . '/flags'
58 58
         ],
59 59
 
@@ -110,6 +110,6 @@  discard block
 block discarded – undo
110 110
         ],
111 111
 
112 112
         'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
113
-                     <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>',
113
+                     <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG').'\' alt=\'XOOPS Project\' /></a>',
114 114
     ];
115 115
 }
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
 
32 32
 use XoopsModules\Newbb;
33 33
 
34
-require_once __DIR__ . '/admin_header.php';
34
+require_once __DIR__.'/admin_header.php';
35 35
 //require_once  dirname(__DIR__) . '/class/Utility.php';
36
-require_once  dirname(__DIR__) . '/include/functions.stats.php';
36
+require_once  dirname(__DIR__).'/include/functions.stats.php';
37 37
 
38
-$attach_path = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/');
39
-$thumb_path  = $attach_path . 'thumbs/';
38
+$attach_path = $GLOBALS['xoops']->path($GLOBALS['xoopsModuleConfig']['dir_attachments'].'/');
39
+$thumb_path  = $attach_path.'thumbs/';
40 40
 $folder      = [$attach_path, $thumb_path];
41 41
 
42 42
 /** @var Xmf\Module\Admin $adminObject */
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
     $imageLibs = [];
76 76
     unset($output, $status);
77 77
     if (1 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) {
78
-        $path = empty($GLOBALS['xoopsModuleConfig']['path_magick']) ? '' : $GLOBALS['xoopsModuleConfig']['path_magick'] . '/';
79
-        @exec($path . 'convert -version', $output, $status);
78
+        $path = empty($GLOBALS['xoopsModuleConfig']['path_magick']) ? '' : $GLOBALS['xoopsModuleConfig']['path_magick'].'/';
79
+        @exec($path.'convert -version', $output, $status);
80 80
         if (empty($status) && !empty($output) && preg_match("/imagemagick[ \t]+([0-9\.]+)/i", $output[0], $matches)) {
81 81
             $imageLibs['imagemagick'] = $matches[0];
82 82
         }
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
         unset($output, $status);
85 85
     }
86 86
     if (2 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) {
87
-        $path = empty($GLOBALS['xoopsModuleConfig']['path_netpbm']) ? '' : $GLOBALS['xoopsModuleConfig']['path_netpbm'] . '/';
88
-        @exec($path . 'jpegtopnm -version 2>&1', $output, $status);
87
+        $path = empty($GLOBALS['xoopsModuleConfig']['path_netpbm']) ? '' : $GLOBALS['xoopsModuleConfig']['path_netpbm'].'/';
88
+        @exec($path.'jpegtopnm -version 2>&1', $output, $status);
89 89
         if (empty($status) && !empty($output) && preg_match("/netpbm[ \t]+([0-9\.]+)/i", $output[0], $matches)) {
90 90
             $imageLibs['netpbm'] = $matches[0];
91 91
         }
@@ -127,30 +127,30 @@  discard block
 block discarded – undo
127 127
 $adminObject->addInfoBox(_AM_NEWBB_PREFERENCES);
128 128
 // START irmtfan better poll module display link and version - check if xoops poll module is available
129 129
 if ($isOK) {
130
-    $pollLink = _AM_NEWBB_AVAILABLE . ': ';
131
-    $pollLink .= '<a href="' . XOOPS_URL . '/modules/' . $xoopspoll->getVar('dirname') . '/admin/index.php"';
132
-    $pollLink .= ' alt="' . $xoopspoll->getVar('name') . ' ' . _VERSION . ' (' . $xoopspoll->getInfo('version') . ') "';
133
-    $pollLink .= ' title="' . $xoopspoll->getVar('name') . ' ' . _VERSION . ' (' . $xoopspoll->getInfo('version') . ') "';
134
-    $pollLink .= '>' . '(' . $xoopspoll->getVar('name') . ')</a>';
130
+    $pollLink = _AM_NEWBB_AVAILABLE.': ';
131
+    $pollLink .= '<a href="'.XOOPS_URL.'/modules/'.$xoopspoll->getVar('dirname').'/admin/index.php"';
132
+    $pollLink .= ' alt="'.$xoopspoll->getVar('name').' '._VERSION.' ('.$xoopspoll->getInfo('version').') "';
133
+    $pollLink .= ' title="'.$xoopspoll->getVar('name').' '._VERSION.' ('.$xoopspoll->getInfo('version').') "';
134
+    $pollLink .= '>'.'('.$xoopspoll->getVar('name').')</a>';
135 135
 } else {
136 136
     $pollLink = _AM_NEWBB_NOTAVAILABLE;
137 137
 }
138
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_POLLMODULE . ': %s', $pollLink));
138
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_POLLMODULE.': %s', $pollLink));
139 139
 // END irmtfan better poll module display link and version - check if xoops poll module is available
140
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_IMAGEMAGICK . ' %s', array_key_exists('imagemagick', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['imagemagick'] : _AM_NEWBB_NOTAVAILABLE));
141
-$adminObject->addInfoBoxLine(sprintf('NetPBM' . ': %s', array_key_exists('netpbm', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['netpbm'] : _AM_NEWBB_NOTAVAILABLE));
142
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_GDLIB . ' %s', array_key_exists('gd', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['gd'] : _AM_NEWBB_NOTAVAILABLE));
143
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_UPLOAD . ' %s', $uploadlimit));
144
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_INDEX_PDF_PAGE . '', ''));
140
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_IMAGEMAGICK.' %s', array_key_exists('imagemagick', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['imagemagick'] : _AM_NEWBB_NOTAVAILABLE));
141
+$adminObject->addInfoBoxLine(sprintf('NetPBM'.': %s', array_key_exists('netpbm', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['netpbm'] : _AM_NEWBB_NOTAVAILABLE));
142
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_GDLIB.' %s', array_key_exists('gd', $imageLibs) ? _AM_NEWBB_AUTODETECTED . $imageLibs['gd'] : _AM_NEWBB_NOTAVAILABLE));
143
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_UPLOAD.' %s', $uploadlimit));
144
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_INDEX_PDF_PAGE.'', ''));
145 145
 
146 146
 $adminObject->addInfoBox(_AM_NEWBB_BOARDSUMMARY);
147
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALTOPICS . ': %s', getTotalTopics()));
148
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALPOSTS . ': %s', getTotalPosts()));
149
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALVIEWS . ': %s', getTotalViews()));
147
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALTOPICS.': %s', getTotalTopics()));
148
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALPOSTS.': %s', getTotalPosts()));
149
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_TOTALVIEWS.': %s', getTotalViews()));
150 150
 
151 151
 $adminObject->addInfoBox(_AM_NEWBB_REPORT);
152
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PENDING . ': %s', $reportHandler->getCount(new \Criteria('report_result', 0))));
153
-$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PROCESSED . ': %s', $reportHandler->getCount(new \Criteria('report_result', 1))));
152
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PENDING.': %s', $reportHandler->getCount(new \Criteria('report_result', 0))));
153
+$adminObject->addInfoBoxLine(sprintf(_AM_NEWBB_REPORT_PROCESSED.': %s', $reportHandler->getCount(new \Criteria('report_result', 1))));
154 154
 
155 155
 $_ufolders = $newbb_config->uploadFolders;
156 156
 foreach ($_ufolders as $wert) { 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 $adminObject->displayNavigation(basename(__FILE__));
163 163
 $adminObject->displayIndex();
164 164
 
165
-require_once __DIR__ . '/admin_footer.php';
165
+require_once __DIR__.'/admin_footer.php';
166 166
 
167 167
 $cacheHelper = Newbb\Utility::cleanCache();
168 168
 //$cacheHelper = new \Xmf\Module\Helper\Cache('newbb');
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
         switch (substr($sizeAsString, -1)) {
181 181
             case 'M':
182 182
             case 'm':
183
-                return (int)$sizeAsString * 1048576;
183
+                return (int) $sizeAsString * 1048576;
184 184
             case 'K':
185 185
             case 'k':
186
-                return (int)$sizeAsString * 1024;
186
+                return (int) $sizeAsString * 1024;
187 187
             case 'G':
188 188
             case 'g':
189
-                return (int)$sizeAsString * 1073741824;
189
+                return (int) $sizeAsString * 1073741824;
190 190
             default:
191 191
                 return $sizeAsString;
192 192
         }
@@ -194,6 +194,6 @@  discard block
 block discarded – undo
194 194
         $base   = log($sizeAsString) / log(1024);
195 195
         $suffix = ['', 'KB', 'MB', 'GB', 'TB'];
196 196
 
197
-        return round(1024 ** ($base - floor($base))) . ' ' . $suffix[(int)floor($base)];
197
+        return round(1024 ** ($base - floor($base))).' '.$suffix[(int) floor($base)];
198 198
     }
199 199
 }
Please login to merge, or discard this patch.