@@ -4,7 +4,7 @@ |
||
4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
5 | 5 | */ |
6 | 6 | spl_autoload_register( |
7 | - static function ($class) { |
|
7 | + static function($class) { |
|
8 | 8 | // project-specific namespace prefix |
9 | 9 | $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
10 | 10 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $helper->loadLanguage('common'); |
41 | 41 | |
42 | 42 | // get path to icons |
43 | -$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/'; |
|
43 | +$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/'; |
|
44 | 44 | if (is_object($helper->getModule()) && false !== $helper->getModule()->getInfo('modicons32')) { |
45 | 45 | $pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32')); |
46 | 46 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | self::rrmdir($fObj->getPathname()); |
147 | 147 | } |
148 | 148 | } |
149 | - $iterator = null; // clear iterator Obj to close file/directory |
|
149 | + $iterator = null; // clear iterator Obj to close file/directory |
|
150 | 150 | return \rmdir($src); // remove the directory & return results |
151 | 151 | } |
152 | 152 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | // rmdir($fObj->getPath()); // now delete the directory |
187 | 187 | } |
188 | 188 | } |
189 | - $iterator = null; // clear iterator Obj to close file/directory |
|
189 | + $iterator = null; // clear iterator Obj to close file/directory |
|
190 | 190 | return \rmdir($src); // remove the directory & return results |
191 | 191 | } |
192 | 192 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | public static function hideButtons(): void |
63 | 63 | { |
64 | - $yamlFile = \dirname(__DIR__, 2) . '/config/admin.yml'; |
|
64 | + $yamlFile = \dirname(__DIR__, 2) . '/config/admin.yml'; |
|
65 | 65 | $app = []; |
66 | 66 | $app['displaySampleButton'] = 0; |
67 | 67 | Yaml::save($app, $yamlFile); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | public static function showButtons(): void |
72 | 72 | { |
73 | - $yamlFile = \dirname(__DIR__, 2) . '/config/admin.yml'; |
|
73 | + $yamlFile = \dirname(__DIR__, 2) . '/config/admin.yml'; |
|
74 | 74 | $app = []; |
75 | 75 | $app['displaySampleButton'] = 1; |
76 | 76 | Yaml::save($app, $yamlFile); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | 'text' => $value['answer'], |
27 | 27 | ], |
28 | 28 | ]; |
29 | - $jsonld[] = $schema; |
|
29 | + $jsonld[] = $schema; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | $out .= '<script type="application/ld+json">' . json_encode($jsonld, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . '</script>'; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $html .= "<ul>\n"; |
48 | 48 | |
49 | 49 | $gdlib = \function_exists('gd_info') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>'; |
50 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; |
|
50 | + $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; |
|
51 | 51 | if (\function_exists('gd_info') && true === ($gdlib = gd_info())) { |
52 | 52 | $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>'; |
53 | 53 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | // $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals; |
59 | 59 | |
60 | 60 | $downloads = \ini_get('file_uploads') ? '<span style="color: #008000;">' . \constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: #ff0000;">' . \constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>'; |
61 | - $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; |
|
61 | + $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; |
|
62 | 62 | |
63 | 63 | $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('upload_max_filesize') . "</span></b>\n"; |
64 | 64 | $html .= '<li>' . \constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: #0000ff;">' . \ini_get('post_max_size') . "</span></b>\n"; |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | */ |
39 | 39 | class SysUtility |
40 | 40 | { |
41 | - use VersionChecks; //checkVerXoops, checkVerPhp Traits |
|
42 | - use ServerStats; // getServerStats Trait |
|
43 | - use FilesManagement; // Files Management Trait |
|
41 | + use VersionChecks; //checkVerXoops, checkVerPhp Traits |
|
42 | + use ServerStats; // getServerStats Trait |
|
43 | + use FilesManagement; // Files Management Trait |
|
44 | 44 | //use ModuleStats; // ModuleStats Trait |
45 | 45 | |
46 | 46 | //--------------- Common module methods ----------------------------- |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | global $start, $order, $sort; |
64 | 64 | |
65 | - $selectView = ''; |
|
65 | + $selectView = ''; |
|
66 | 66 | $helper = Helper::getInstance(); |
67 | 67 | |
68 | 68 | //$pathModIcon16 = XOOPS_URL . '/modules/' . $moduleDirName . '/' . $helper->getConfig('modicons16'); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $contentLength = \mb_strlen(\preg_replace('/&[0-9a-z]{2,8};|&#\d{1,7};|[0-9a-f]{1,6};/i', ' ', $lineMatchings[2])); |
243 | 243 | if ($totalLength + $contentLength > $length) { |
244 | 244 | // the number of characters which are left |
245 | - $left = $length - $totalLength; |
|
245 | + $left = $length - $totalLength; |
|
246 | 246 | $entitiesLength = 0; |
247 | 247 | // search for html entities |
248 | 248 | if (\preg_match_all('/&[0-9a-z]{2,8};|&#\d{1,7};|[0-9a-f]{1,6};/i', $lineMatchings[2], $entities, \PREG_OFFSET_CAPTURE)) { |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | // maximum length is reached, so get off the loop |
262 | 262 | break; |
263 | 263 | } |
264 | - $truncate .= $lineMatchings[2]; |
|
264 | + $truncate .= $lineMatchings[2]; |
|
265 | 265 | $totalLength += $contentLength; |
266 | 266 | |
267 | 267 | // if the maximum length is reached, get off the loop |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $thisContentTitle = '<a href="' . $helper->url('index.php?cat_id=' . $thisCatId . '#q' . $object->getVar('contents_id')) . '" title="' . \_AM_XOOPSFAQ_CONTENTS_VIEW . '">' . $object->getVar('contents_title') . '</a>'; |
200 | 200 | ++$tdClass; |
201 | 201 | $dispClass = ($tdClass % 1) ? 'even' : 'odd'; |
202 | - $ret .= ' <tr class="center middle">' |
|
202 | + $ret .= ' <tr class="center middle">' |
|
203 | 203 | . ' <td class="' |
204 | 204 | . $dispClass |
205 | 205 | . '">' |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | . ' <td class="' |
234 | 234 | . $dispClass |
235 | 235 | . '">'; |
236 | - $ret .= Utility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id')) . '</td>' . ' </tr>'; |
|
236 | + $ret .= Utility::renderIconLinks($buttons, 'contents_id', $object->getVar('contents_id')) . '</td>' . ' </tr>'; |
|
237 | 237 | } |
238 | 238 | } else { |
239 | 239 | $ret .= ' <tr class="center"><td colspan="7" class="even">' . \_AM_XOOPSFAQ_NOLISTING . '</td></tr>'; |
@@ -151,7 +151,7 @@ |
||
151 | 151 | $options_tray = new XoopsFormElementTray(\_AM_XOOPSFAQ_E_CONTENTS_CONTENT, '<br>'); |
152 | 152 | if (\class_exists('XoopsFormEditor')) { |
153 | 153 | // $editorConfigs = array('editor' => $GLOBALS['xoopsConfig']['general_editor'], |
154 | - $editorConfigs = [ |
|
154 | + $editorConfigs = [ |
|
155 | 155 | 'editor' => $helper->getConfig('use_wysiwyg', 'dhtmltextarea'), |
156 | 156 | 'rows' => 25, |
157 | 157 | 'cols' => '100%', |