Completed
Push — master ( 2f6fab...c5b9c9 )
by Goffy
11s queued 10s
created
modules/tools/class/Common/SysUtility.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -23,10 +23,8 @@
 block discarded – undo
23 23
  * @author       Mamba <[email protected]>
24 24
  */
25 25
 
26
-use MyTextSanitizer;
27 26
 use XoopsFormDhtmlTextArea;
28 27
 use XoopsFormEditor;
29
-use XoopsFormTextArea;
30 28
 use XoopsModules\Tools;
31 29
 use XoopsModules\Tools\Helper;
32 30
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
     {
67 67
         if ($considerHtml) {
68 68
             // if the plain text is shorter than the maximum length, return the whole text
69
-            if (mb_strlen(preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
69
+            if (mb_strlen(preg_replace('/<.*?'.'>/', '', $text)) <= $length) {
70 70
                 return $text;
71 71
             }
72 72
             // splits all html-tags to scanable lines
73
-            preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
73
+            preg_match_all('/(<.+?'.'>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
74 74
             $total_length = mb_strlen($ending);
75 75
             $open_tags    = [];
76 76
             $truncate     = '';
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                             unset($open_tags[$pos]);
89 89
                         }
90 90
                         // if tag is an opening tag
91
-                    } elseif (preg_match('/^<\s*([^\s>!]+).*?' . '>$/s', $line_matchings[1], $tag_matchings)) {
91
+                    } elseif (preg_match('/^<\s*([^\s>!]+).*?'.'>$/s', $line_matchings[1], $tag_matchings)) {
92 92
                         // add tag to the beginning of $open_tags list
93 93
                         array_unshift($open_tags, mb_strtolower($tag_matchings[1]));
94 94
                     }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         if ($considerHtml) {
147 147
             // close all unclosed html-tags
148 148
             foreach ($open_tags as $tag) {
149
-                $truncate .= '</' . $tag . '>';
149
+                $truncate .= '</'.$tag.'>';
150 150
             }
151 151
         }
152 152
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         // set the auto-incremented id's value to blank.
227 227
         unset($tempTable[$id_field]);
228 228
         // insert cloned copy of the original  record
229
-        $sql    = "INSERT INTO $table (" . implode(', ', array_keys($tempTable)) . ") VALUES ('" . implode("', '", array_values($tempTable)) . "')";
229
+        $sql    = "INSERT INTO $table (".implode(', ', array_keys($tempTable)).") VALUES ('".implode("', '", array_values($tempTable))."')";
230 230
         $result = $GLOBALS['xoopsDB']->queryF($sql);
231 231
         if (!$result) {
232 232
             exit($GLOBALS['xoopsDB']->error());
Please login to merge, or discard this patch.
modules/tools/include/common.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
  * @author      XOOPS Development Team
16 16
  */
17 17
 
18
-use Xmf\Module\Admin;
18
+use Xmf\Module\Admin;
19 19
 use XoopsModules\Tools;
20 20
 
21 21
 require_once dirname(__DIR__) . '/preloads/autoloader.php';
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 use Xmf\Module\Admin;
19 19
 use XoopsModules\Tools;
20 20
 
21
-require_once dirname(__DIR__) . '/preloads/autoloader.php';
21
+require_once dirname(__DIR__).'/preloads/autoloader.php';
22 22
 
23 23
 $moduleDirName      = \basename(\dirname(__DIR__));
24 24
 $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
 //$categoryHandler     = new Tools\CategoryHandler($db);
38 38
 //$downloadHandler     = new Tools\DownloadHandler($db);
39 39
 
40
-if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) {
41
-    define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__)));
42
-    define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
43
-    define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
44
-    define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/');
45
-    define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/');
46
-    define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images');
47
-    define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/');
48
-    define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/');
49
-    define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php');
50
-    define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png');
51
-    define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash
52
-    define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash
53
-    define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1);
40
+if (!defined($moduleDirNameUpper.'_CONSTANTS_DEFINED')) {
41
+    define($moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__)));
42
+    define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
43
+    define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
44
+    define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.$moduleDirName.'/');
45
+    define($moduleDirNameUpper.'_IMAGE_URL', constant($moduleDirNameUpper.'_URL').'/assets/images/');
46
+    define($moduleDirNameUpper.'_IMAGE_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/assets/images');
47
+    define($moduleDirNameUpper.'_ADMIN_URL', constant($moduleDirNameUpper.'_URL').'/admin/');
48
+    define($moduleDirNameUpper.'_ADMIN_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/admin/');
49
+    define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php');
50
+    define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', constant($moduleDirNameUpper.'_URL').'/assets/images/logoModule.png');
51
+    define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash
52
+    define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash
53
+    define($moduleDirNameUpper.'_CONSTANTS_DEFINED', 1);
54 54
 }
55 55
 
56 56
 $pathIcon16 = Admin::iconUrl('', 16);
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
 //$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
60 60
 
61 61
 $icons = [
62
-    'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . "' align='middle'>",
63
-    'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>",
64
-    'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>",
65
-    'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>",
66
-    'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>",
67
-    'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>",
68
-    'add'     => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>",
69
-    '0'       => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>",
70
-    '1'       => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>",
62
+    'edit'    => "<img src='".$pathIcon16."/edit.png'  alt="._EDIT."' align='middle'>",
63
+    'delete'  => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>",
64
+    'clone'   => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>",
65
+    'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>",
66
+    'print'   => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>",
67
+    'pdf'     => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>",
68
+    'add'     => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>",
69
+    '0'       => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>",
70
+    '1'       => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>",
71 71
 ];
72 72
 
73 73
 $debug = false;
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
     $GLOBALS['xoopsTpl'] = new \XoopsTpl();
81 81
 }
82 82
 
83
-$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL . '/modules/' . $moduleDirName);
83
+$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL.'/modules/'.$moduleDirName);
84 84
 // Local icons path
85 85
 if (is_object($helper->getModule())) {
86 86
     $pathModIcon16 = $helper->getModule()->getInfo('modicons16');
87 87
     $pathModIcon32 = $helper->getModule()->getInfo('modicons32');
88 88
 
89
-    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16);
89
+    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL.'/modules/'.$moduleDirName.'/'.$pathModIcon16);
90 90
     $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32);
91 91
 }
Please login to merge, or discard this patch.
modules/tools/testdata/index.php 3 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
  * @author          Michael Beck (aka Mamba)
14 14
  */
15 15
 
16
-use Xmf\Database\TableLoad;
17
-use Xmf\Request;
16
+use Xmf\Database\TableLoad;
17
+use Xmf\Request;
18 18
 use Xmf\Yaml;
19 19
 use XoopsModules\Tools\{
20 20
     Helper,
Please login to merge, or discard this patch.
Switch Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -38,24 +38,24 @@
 block discarded – undo
38 38
 $helper->loadLanguage('common');
39 39
 
40 40
 switch ($op) {
41
-    case 'load':
42
-        if (Request::hasVar('ok', 'REQUEST') && 1 === Request::getInt('ok', 0)) {
43
-            if (!$GLOBALS['xoopsSecurity']->check()) {
44
-                redirect_header($helper->url('admin/index.php'), 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
45
-            }
46
-            loadSampleData();
47
-        } else {
48
-            xoops_cp_header();
49
-            xoops_confirm(['ok' => 1, 'op' => 'load'], 'index.php', sprintf(constant('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA_CONFIRM')), constant('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM'), true);
50
-            xoops_cp_footer();
41
+case 'load':
42
+    if (Request::hasVar('ok', 'REQUEST') && 1 === Request::getInt('ok', 0)) {
43
+        if (!$GLOBALS['xoopsSecurity']->check()) {
44
+            redirect_header($helper->url('admin/index.php'), 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
51 45
         }
52
-        break;
53
-    case 'save':
54
-        saveSampleData();
55
-        break;
56
-    case 'clear':
57
-        clearSampleData();
58
-        break;
46
+        loadSampleData();
47
+    } else {
48
+        xoops_cp_header();
49
+        xoops_confirm(['ok' => 1, 'op' => 'load'], 'index.php', sprintf(constant('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA_CONFIRM')), constant('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM'), true);
50
+        xoops_cp_footer();
51
+    }
52
+    break;
53
+case 'save':
54
+    saveSampleData();
55
+    break;
56
+case 'clear':
57
+    clearSampleData();
58
+    break;
59 59
 }
60 60
 
61 61
 // XMF TableLoad for SAMPLE data
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 /** @var Utility $utility */
26 26
 /** @var Configurator $configurator */
27 27
 
28
-require dirname(__DIR__, 3) . '/include/cp_header.php';
29
-require dirname(__DIR__) . '/preloads/autoloader.php';
28
+require dirname(__DIR__, 3).'/include/cp_header.php';
29
+require dirname(__DIR__).'/preloads/autoloader.php';
30 30
 
31 31
 $op = Request::getCmd('op', '');
32 32
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             loadSampleData();
47 47
         } else {
48 48
             xoops_cp_header();
49
-            xoops_confirm(['ok' => 1, 'op' => 'load'], 'index.php', sprintf(constant('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA_CONFIRM')), constant('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM'), true);
49
+            xoops_confirm(['ok' => 1, 'op' => 'load'], 'index.php', sprintf(constant('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA_CONFIRM')), constant('CO_'.$moduleDirNameUpper.'_'.'CONFIRM'), true);
50 50
             xoops_cp_footer();
51 51
         }
52 52
         break;
@@ -72,20 +72,20 @@  discard block
 block discarded – undo
72 72
     $tables = \Xmf\Module\Helper::getHelper($moduleDirName)->getModule()->getInfo('tables');
73 73
 
74 74
     $language = 'english/';
75
-    if (is_dir(__DIR__ . '/' . $xoopsConfig['language'])) {
76
-        $language = $xoopsConfig['language'] . '/';
75
+    if (is_dir(__DIR__.'/'.$xoopsConfig['language'])) {
76
+        $language = $xoopsConfig['language'].'/';
77 77
     }
78 78
 
79 79
     // load module tables
80 80
     foreach ($tables as $table) {
81
-        $tabledata = Yaml::readWrapped($language . $table . '.yml');
81
+        $tabledata = Yaml::readWrapped($language.$table.'.yml');
82 82
         TableLoad::truncateTable($table);
83 83
         TableLoad::loadTableFromArray($table, $tabledata);
84 84
     }
85 85
 
86 86
     // load permissions
87 87
     $table     = 'group_permission';
88
-    $tabledata = Yaml::readWrapped($language . $table . '.yml');
88
+    $tabledata = Yaml::readWrapped($language.$table.'.yml');
89 89
     $mid       = \Xmf\Module\Helper::getHelper($moduleDirName)->getModule()->getVar('mid');
90 90
     loadTableFromArrayWithReplace($table, $tabledata, 'gperm_modid', $mid);
91 91
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             $utility::rcopy($src, $dest);
99 99
         }
100 100
     }
101
-    \redirect_header('../admin/index.php', 1, \constant('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA_SUCCESS'));
101
+    \redirect_header('../admin/index.php', 1, \constant('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA_SUCCESS'));
102 102
 }
103 103
 
104 104
 function saveSampleData()
@@ -109,26 +109,26 @@  discard block
 block discarded – undo
109 109
     $helper             = Helper::getInstance();
110 110
     $tables             = $helper->getModule()->getInfo('tables');
111 111
 
112
-    $languageFolder = __DIR__ . '/' . $xoopsConfig['language'];
113
-    if (!file_exists($languageFolder . '/')) {
114
-        Utility::createFolder($languageFolder . '/');
112
+    $languageFolder = __DIR__.'/'.$xoopsConfig['language'];
113
+    if (!file_exists($languageFolder.'/')) {
114
+        Utility::createFolder($languageFolder.'/');
115 115
     }
116
-    $exportFolder = $languageFolder . '/Exports-' . date('Y-m-d-H-i-s') . '/';
116
+    $exportFolder = $languageFolder.'/Exports-'.date('Y-m-d-H-i-s').'/';
117 117
     Utility::createFolder($exportFolder);
118 118
 
119 119
     // save module tables
120 120
     foreach ($tables as $table) {
121
-        TableLoad::saveTableToYamlFile($table, $exportFolder . $table . '.yml');
121
+        TableLoad::saveTableToYamlFile($table, $exportFolder.$table.'.yml');
122 122
     }
123 123
 
124 124
     // save permissions
125 125
     $criteria = new \CriteriaCompo();
126 126
     $criteria->add(new \Criteria('gperm_modid', $helper->getModule()->getVar('mid')));
127 127
     $skipColumns[] = 'gperm_id';
128
-    TableLoad::saveTableToYamlFile('group_permission', $exportFolder . 'group_permission.yml', $criteria, $skipColumns);
128
+    TableLoad::saveTableToYamlFile('group_permission', $exportFolder.'group_permission.yml', $criteria, $skipColumns);
129 129
     unset($criteria);
130 130
 
131
-    \redirect_header('../admin/index.php', 1, \constant('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA_SUCCESS'));
131
+    \redirect_header('../admin/index.php', 1, \constant('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA_SUCCESS'));
132 132
 }
133 133
 
134 134
 function exportSchema()
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         //
144 144
         //        redirect_header('../admin/index.php', 1, constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_SUCCESS'));
145 145
     } catch (\Throwable $e) {
146
-        exit(constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_ERROR'));
146
+        exit(constant('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_ERROR'));
147 147
     }
148 148
 }
149 149
 
@@ -167,12 +167,12 @@  discard block
 block discarded – undo
167 167
     $prefixedTable = $db->prefix($table);
168 168
     $count         = 0;
169 169
 
170
-    $sql = 'DELETE FROM ' . $prefixedTable . ' WHERE `' . $search . '`=' . $db->quote($replace);
170
+    $sql = 'DELETE FROM '.$prefixedTable.' WHERE `'.$search.'`='.$db->quote($replace);
171 171
 
172 172
     $result = $db->queryF($sql);
173 173
 
174 174
     foreach ($data as $row) {
175
-        $insertInto  = 'INSERT INTO ' . $prefixedTable . ' (';
175
+        $insertInto  = 'INSERT INTO '.$prefixedTable.' (';
176 176
         $valueClause = ' VALUES (';
177 177
         $first       = true;
178 178
         foreach ($row as $column => $value) {
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             }
192 192
         }
193 193
 
194
-        $sql = $insertInto . ') ' . $valueClause . ')';
194
+        $sql = $insertInto.') '.$valueClause.')';
195 195
 
196 196
         $result = $db->queryF($sql);
197 197
         if (false !== $result) {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     return $count;
203 203
 }
204 204
 
205
-function clearSampleData(){
205
+function clearSampleData() {
206 206
     $moduleDirName      = \basename(\dirname(__DIR__));
207 207
     $moduleDirNameUpper = mb_strtoupper($moduleDirName);
208 208
     $helper             = Helper::getInstance();
@@ -213,5 +213,5 @@  discard block
 block discarded – undo
213 213
     foreach ($tables as $table) {
214 214
         \Xmf\Database\TableLoad::truncateTable($table);
215 215
     }
216
-    redirect_header($helper->url('admin/index.php'), 1, constant('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA_OK'));
216
+    redirect_header($helper->url('admin/index.php'), 1, constant('CO_'.$moduleDirNameUpper.'_'.'CLEAR_SAMPLEDATA_OK'));
217 217
 }
Please login to merge, or discard this patch.
modules/tools/language/english/common.php 1 patch
Spacing   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -17,138 +17,138 @@  discard block
 block discarded – undo
17 17
 $moduleDirName = \basename(\dirname(__DIR__, 2));
18 18
 $moduleDirNameUpper = mb_strtoupper($moduleDirName);
19 19
 
20
-\define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: ');
21
-\define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: ');
22
-\define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
23
-\define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
24
-\define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status');
25
-\define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
26
-\define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
27
-\define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
28
-\define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
29
-\define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>");
30
-\define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>");
31
-\define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: ');
32
-\define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: ');
33
-\define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
34
-\define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
35
-
36
-\define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>");
37
-\define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
38
-
39
-\define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
40
-\define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields");
41
-\define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
42
-\define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s');
43
-\define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
44
-\define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
45
-\define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
46
-
47
-\define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
20
+\define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: ');
21
+\define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: ');
22
+\define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
23
+\define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
24
+\define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status');
25
+\define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
26
+\define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
27
+\define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
28
+\define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
29
+\define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>");
30
+\define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>");
31
+\define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: ');
32
+\define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: ');
33
+\define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
34
+\define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
35
+
36
+\define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>");
37
+\define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
38
+
39
+\define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
40
+\define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields");
41
+\define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
42
+\define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s');
43
+\define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
44
+\define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
45
+\define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
46
+
47
+\define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
48 48
 
49 49
 // Error Msgs
50
-\define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
51
-\define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s');
52
-\define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin');
50
+\define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
51
+\define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s');
52
+\define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin');
53 53
 
54 54
 //Help
55
-\define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__, 2)));
56
-\define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__ . '/help/helpheader.tpl');
57
-\define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of ');
58
-\define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview');
55
+\define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__, 2)));
56
+\define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
57
+\define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of ');
58
+\define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview');
59 59
 
60 60
 //\define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__);
61 61
 
62 62
 //help multi-page
63
-\define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer');
64
-\define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License');
65
-\define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support');
63
+\define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer');
64
+\define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License');
65
+\define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support');
66 66
 
67 67
 //Sample Data
68
-\define('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
69
-\define('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA_CONFIRM', 'Are you sure to Import Sample Data? (It will delete ALL current data)');
70
-\define('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA_SUCCESS', 'Sample Date imported  successfully');
71
-\define('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA', 'Export Tables to YAML');
72
-\define('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA_SUCCESS', 'Export Tables to YAML successfully');
73
-\define('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA', 'Clear Sample Data');
74
-\define('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA_OK', 'The Sample Data has been cleared');
75
-\define('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA_CONFIRM', 'Are you sure to Clear Sample Data? (It will delete ALL current data)');
76
-\define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA', 'Export DB Schema to YAML');
77
-\define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
78
-\define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
79
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
80
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
81
-\define('CO_' . $moduleDirNameUpper . '_' . 'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons)');
82
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons)');
83
-
84
-\define('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM', 'Confirm');
68
+\define('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
69
+\define('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA_CONFIRM', 'Are you sure to Import Sample Data? (It will delete ALL current data)');
70
+\define('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA_SUCCESS', 'Sample Date imported  successfully');
71
+\define('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA', 'Export Tables to YAML');
72
+\define('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA_SUCCESS', 'Export Tables to YAML successfully');
73
+\define('CO_'.$moduleDirNameUpper.'_'.'CLEAR_SAMPLEDATA', 'Clear Sample Data');
74
+\define('CO_'.$moduleDirNameUpper.'_'.'CLEAR_SAMPLEDATA_OK', 'The Sample Data has been cleared');
75
+\define('CO_'.$moduleDirNameUpper.'_'.'CLEAR_SAMPLEDATA_CONFIRM', 'Are you sure to Clear Sample Data? (It will delete ALL current data)');
76
+\define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA', 'Export DB Schema to YAML');
77
+\define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
78
+\define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
79
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
80
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
81
+\define('CO_'.$moduleDirNameUpper.'_'.'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons)');
82
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons)');
83
+
84
+\define('CO_'.$moduleDirNameUpper.'_'.'CONFIRM', 'Confirm');
85 85
 
86 86
 //letter choice
87
-\define('CO_' . $moduleDirNameUpper . '_' . 'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>");
88
-\define('CO_' . $moduleDirNameUpper . '_' . 'OTHER', 'Other');
89
-\define('CO_' . $moduleDirNameUpper . '_' . 'ALL', 'All');
87
+\define('CO_'.$moduleDirNameUpper.'_'.'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>");
88
+\define('CO_'.$moduleDirNameUpper.'_'.'OTHER', 'Other');
89
+\define('CO_'.$moduleDirNameUpper.'_'.'ALL', 'All');
90 90
 
91 91
 // block defines
92
-\define('CO_' . $moduleDirNameUpper . '_' . 'ACCESSRIGHTS', 'Access Rights');
93
-\define('CO_' . $moduleDirNameUpper . '_' . 'ACTION', 'Action');
94
-\define('CO_' . $moduleDirNameUpper . '_' . 'ACTIVERIGHTS', 'Active Rights');
95
-\define('CO_' . $moduleDirNameUpper . '_' . 'BADMIN', 'Block Administration');
96
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLKDESC', 'Description');
97
-\define('CO_' . $moduleDirNameUpper . '_' . 'CBCENTER', 'Center Middle');
98
-\define('CO_' . $moduleDirNameUpper . '_' . 'CBLEFT', 'Center Left');
99
-\define('CO_' . $moduleDirNameUpper . '_' . 'CBRIGHT', 'Center Right');
100
-\define('CO_' . $moduleDirNameUpper . '_' . 'SBLEFT', 'Left');
101
-\define('CO_' . $moduleDirNameUpper . '_' . 'SBRIGHT', 'Right');
102
-\define('CO_' . $moduleDirNameUpper . '_' . 'SIDE', 'Alignment');
103
-\define('CO_' . $moduleDirNameUpper . '_' . 'TITLE', 'Title');
104
-\define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE', 'Visible');
105
-\define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN', 'Visible In');
106
-\define('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT', 'Weight');
107
-
108
-\define('CO_' . $moduleDirNameUpper . '_' . 'PERMISSIONS', 'Permissions');
109
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS', 'Blocks Admin');
110
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_DESC', 'Blocks/Group Admin');
111
-
112
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_MANAGMENT', 'Manage');
113
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADDBLOCK', 'Add a new block');
114
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_EDITBLOCK', 'Edit a block');
115
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_CLONEBLOCK', 'Clone a block');
92
+\define('CO_'.$moduleDirNameUpper.'_'.'ACCESSRIGHTS', 'Access Rights');
93
+\define('CO_'.$moduleDirNameUpper.'_'.'ACTION', 'Action');
94
+\define('CO_'.$moduleDirNameUpper.'_'.'ACTIVERIGHTS', 'Active Rights');
95
+\define('CO_'.$moduleDirNameUpper.'_'.'BADMIN', 'Block Administration');
96
+\define('CO_'.$moduleDirNameUpper.'_'.'BLKDESC', 'Description');
97
+\define('CO_'.$moduleDirNameUpper.'_'.'CBCENTER', 'Center Middle');
98
+\define('CO_'.$moduleDirNameUpper.'_'.'CBLEFT', 'Center Left');
99
+\define('CO_'.$moduleDirNameUpper.'_'.'CBRIGHT', 'Center Right');
100
+\define('CO_'.$moduleDirNameUpper.'_'.'SBLEFT', 'Left');
101
+\define('CO_'.$moduleDirNameUpper.'_'.'SBRIGHT', 'Right');
102
+\define('CO_'.$moduleDirNameUpper.'_'.'SIDE', 'Alignment');
103
+\define('CO_'.$moduleDirNameUpper.'_'.'TITLE', 'Title');
104
+\define('CO_'.$moduleDirNameUpper.'_'.'VISIBLE', 'Visible');
105
+\define('CO_'.$moduleDirNameUpper.'_'.'VISIBLEIN', 'Visible In');
106
+\define('CO_'.$moduleDirNameUpper.'_'.'WEIGHT', 'Weight');
107
+
108
+\define('CO_'.$moduleDirNameUpper.'_'.'PERMISSIONS', 'Permissions');
109
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS', 'Blocks Admin');
110
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_DESC', 'Blocks/Group Admin');
111
+
112
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_MANAGMENT', 'Manage');
113
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADDBLOCK', 'Add a new block');
114
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_EDITBLOCK', 'Edit a block');
115
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_CLONEBLOCK', 'Clone a block');
116 116
 
117 117
 //myblocksadmin
118
-\define('CO_' . $moduleDirNameUpper . '_' . 'AGDS', 'Admin Groups');
119
-\define('CO_' . $moduleDirNameUpper . '_' . 'BCACHETIME', 'Cache Time');
120
-\define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADMIN', 'Blocks Admin');
121
-\define('CO_' . $moduleDirNameUpper . '_' . 'UPDATE_SUCCESS', 'Update successful');
118
+\define('CO_'.$moduleDirNameUpper.'_'.'AGDS', 'Admin Groups');
119
+\define('CO_'.$moduleDirNameUpper.'_'.'BCACHETIME', 'Cache Time');
120
+\define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADMIN', 'Blocks Admin');
121
+\define('CO_'.$moduleDirNameUpper.'_'.'UPDATE_SUCCESS', 'Update successful');
122 122
 
123 123
 //Template Admin
124
-\define('CO_' . $moduleDirNameUpper . '_' . 'TPLSETS', 'Template Management');
125
-\define('CO_' . $moduleDirNameUpper . '_' . 'GENERATE', 'Generate');
126
-\define('CO_' . $moduleDirNameUpper . '_' . 'FILENAME', 'File Name');
124
+\define('CO_'.$moduleDirNameUpper.'_'.'TPLSETS', 'Template Management');
125
+\define('CO_'.$moduleDirNameUpper.'_'.'GENERATE', 'Generate');
126
+\define('CO_'.$moduleDirNameUpper.'_'.'FILENAME', 'File Name');
127 127
 
128 128
 //Menu
129
-\define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE', 'Migrate');
130
-\define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_YES', 'Folder "%s" exist');
131
-\define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.');
132
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS', 'Show Development Tools Button?');
133
-\define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.');
134
-\define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_FEEDBACK', 'Feedback');
135
-\define('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_OK', 'Database migrated to current schema.');
136
-\define('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_WARNING', 'Warning! This is intended for developers only. Confirm write schema file from current database.');
137
-\define('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_SCHEMA_OK', 'Current schema file written');
129
+\define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_MIGRATE', 'Migrate');
130
+\define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_YES', 'Folder "%s" exist');
131
+\define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.');
132
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS', 'Show Development Tools Button?');
133
+\define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.');
134
+\define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_FEEDBACK', 'Feedback');
135
+\define('CO_'.$moduleDirNameUpper.'_'.'MIGRATE_OK', 'Database migrated to current schema.');
136
+\define('CO_'.$moduleDirNameUpper.'_'.'MIGRATE_WARNING', 'Warning! This is intended for developers only. Confirm write schema file from current database.');
137
+\define('CO_'.$moduleDirNameUpper.'_'.'MIGRATE_SCHEMA_OK', 'Current schema file written');
138 138
 
139 139
 //Latest Version Check
140
-\define('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION', 'New Version: ');
140
+\define('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION', 'New Version: ');
141 141
 
142 142
 //DirectoryChecker
143
-\define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>");
144
-\define('CO_' . $moduleDirNameUpper . '_' . 'NOTAVAILABLE', "<span style='color: red;'>Not available</span>");
145
-\define('CO_' . $moduleDirNameUpper . '_' . 'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>");
146
-\define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEDIR', 'Create it');
147
-\define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission');
148
-\define('CO_' . $moduleDirNameUpper . '_' . 'DIRCREATED', 'The directory has been created');
149
-\define('CO_' . $moduleDirNameUpper . '_' . 'DIRNOTCREATED', 'The directory cannot be created');
150
-\define('CO_' . $moduleDirNameUpper . '_' . 'PERMSET', 'The permission has been set');
151
-\define('CO_' . $moduleDirNameUpper . '_' . 'PERMNOTSET', 'The permission cannot be set');
143
+\define('CO_'.$moduleDirNameUpper.'_'.'AVAILABLE', "<span style='color: green;'>Available</span>");
144
+\define('CO_'.$moduleDirNameUpper.'_'.'NOTAVAILABLE', "<span style='color: red;'>Not available</span>");
145
+\define('CO_'.$moduleDirNameUpper.'_'.'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>");
146
+\define('CO_'.$moduleDirNameUpper.'_'.'CREATETHEDIR', 'Create it');
147
+\define('CO_'.$moduleDirNameUpper.'_'.'SETMPERM', 'Set the permission');
148
+\define('CO_'.$moduleDirNameUpper.'_'.'DIRCREATED', 'The directory has been created');
149
+\define('CO_'.$moduleDirNameUpper.'_'.'DIRNOTCREATED', 'The directory cannot be created');
150
+\define('CO_'.$moduleDirNameUpper.'_'.'PERMSET', 'The permission has been set');
151
+\define('CO_'.$moduleDirNameUpper.'_'.'PERMNOTSET', 'The permission cannot be set');
152 152
 
153 153
 //FileChecker
154 154
 //\define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>");
@@ -158,31 +158,31 @@  discard block
 block discarded – undo
158 158
 //\define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEFILE', 'Create it');
159 159
 //\define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission');
160 160
 
161
-\define('CO_' . $moduleDirNameUpper . '_' . 'FILECOPIED', 'The file has been copied');
162
-\define('CO_' . $moduleDirNameUpper . '_' . 'FILENOTCOPIED', 'The file cannot be copied');
161
+\define('CO_'.$moduleDirNameUpper.'_'.'FILECOPIED', 'The file has been copied');
162
+\define('CO_'.$moduleDirNameUpper.'_'.'FILENOTCOPIED', 'The file cannot be copied');
163 163
 
164
-\define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field');
165
-\define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields');
164
+\define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field');
165
+\define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields');
166 166
 
167 167
 //image config
168
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH', 'Image Display Width');
169
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC', 'Display width for image');
170
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT', 'Image Display Height');
171
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC', 'Display height for image');
172
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small;  font-weight: bold;">--- EXTERNAL Image configuration ---</span> ');
173
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC', '');
174
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH', 'Image Upload path');
175
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images');
168
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH', 'Image Display Width');
169
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH_DSC', 'Display width for image');
170
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT', 'Image Display Height');
171
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT_DSC', 'Display height for image');
172
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small;  font-weight: bold;">--- EXTERNAL Image configuration ---</span> ');
173
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG_DSC', '');
174
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH', 'Image Upload path');
175
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images');
176 176
 
177
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE', 'Image File Size (in Bytes)');
178
-\define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_FILE_SIZE_DSC','The maximum file size of the image file (in Bytes)');
177
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_FILE_SIZE', 'Image File Size (in Bytes)');
178
+\define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_FILE_SIZE_DSC', 'The maximum file size of the image file (in Bytes)');
179 179
 
180 180
 
181 181
 //Module Stats
182
-\define('CO_' . $moduleDirNameUpper . '_' . 'STATS_SUMMARY', 'Module Statistics');
183
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_CATEGORIES', 'Categories:');
184
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_ITEMS', 'Items');
185
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_OFFLINE', 'Offline');
186
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_PUBLISHED', 'Published');
187
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_REJECTED', 'Rejected');
188
-\define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_SUBMITTED', 'Submitted');
182
+\define('CO_'.$moduleDirNameUpper.'_'.'STATS_SUMMARY', 'Module Statistics');
183
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_CATEGORIES', 'Categories:');
184
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_ITEMS', 'Items');
185
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_OFFLINE', 'Offline');
186
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_PUBLISHED', 'Published');
187
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_REJECTED', 'Rejected');
188
+\define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_SUBMITTED', 'Submitted');
Please login to merge, or discard this patch.
modules/tools/language/english/modinfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
 //Help
28 28
 define('_MI_TOOLS_DIRNAME', basename(dirname(__DIR__, 2)));
29
-define('_MI_TOOLS_HELP_HEADER', __DIR__ . '/help/helpheader.tpl');
29
+define('_MI_TOOLS_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
30 30
 define('_MI_TOOLS_BACK_2_ADMIN', 'Back to Administration of ');
31 31
 define('_MI_TOOLS_OVERVIEW', 'Overview');
32 32
 
Please login to merge, or discard this patch.
modules/tools/xoops_version.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 // database tables, not applicable for this module
49 49
 $modversion['sqlfile']['mysql'] = 'sql/sql.sql';
50 50
 $modversion['tables']           = [
51
-    $moduleDirName . '_' . 'blocks',
51
+    $moduleDirName.'_'.'blocks',
52 52
 ];
53 53
 
54 54
 // Admin things, not applicable for this module
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
 
75 75
 // ------------------- Templates ------------------- //
76 76
 $modversion['templates'] = [
77
-    ['file' => 'tools_admin_blockscall.tpl', 'description' => '',],
78
-    ['file' => 'tools_admin_blockscall_new.tpl', 'description' => '',],
79
-    ['file' => 'tools_admin_blockscall_edit.tpl', 'description' => '',],
77
+    ['file' => 'tools_admin_blockscall.tpl', 'description' => '', ],
78
+    ['file' => 'tools_admin_blockscall_new.tpl', 'description' => '', ],
79
+    ['file' => 'tools_admin_blockscall_edit.tpl', 'description' => '', ],
80 80
 ];
81 81
 
82 82
 // ------------------- Blocks ------------------- //
Please login to merge, or discard this patch.
modules/tools/admin/main.php 2 patches
Switch Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -29,30 +29,30 @@  discard block
 block discarded – undo
29 29
 
30 30
 $op = $_REQUEST['op'] ?? 'main';
31 31
 switch ($op) {
32
-    default:
33
-    case 'main':
34
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
35
-        $form = new \XoopsThemeForm(_AM_TOOLS_INDEX, 'updatecache', 'main.php', 'post', true);
36
-        $form->addElement(new \XoopsFormLabel(_AM_TOOLS_TIP, _AM_TOOLS_TIPS));
37
-        $checkbox_options = [
38
-            'updatexoopscache'    => _AM_TOOLS_UPDATEXOOPSCACHE,
39
-            'updatesmartycache'   => _AM_TOOLS_UPDATESMARTYCACHE,
40
-            'updatesmartycompile' => _AM_TOOLS_UPDATESMARTYCOMPILE,
41
-        ];
42
-        $checkbox         = new \XoopsFormCheckBox(_AM_TOOLS_OPTIONS, 'options', array_keys($checkbox_options));
43
-        $checkbox->addOptionArray($checkbox_options);
44
-        $form->addElement($checkbox);
45
-        $form->addElement(new \XoopsFormHidden('op', 'updatecache'));
46
-        $form->addElement(new \XoopsFormHidden('step', '1'));
47
-        $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
48
-        $form->display();
49
-        break;
50
-    case 'updatecache':
51
-        if (1 == $_REQUEST['step']) {
52
-            $options  = implode('_', $_REQUEST['options']);
53
-            $url      = XOOPS_URL . "/modules/tools/admin/main.php?op=updatecache&step=2&options={$options}";
54
-            $updating = _AM_TOOLS_UPDATING;
55
-            $msg      = <<<EOF
32
+default:
33
+case 'main':
34
+    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
35
+    $form = new \XoopsThemeForm(_AM_TOOLS_INDEX, 'updatecache', 'main.php', 'post', true);
36
+    $form->addElement(new \XoopsFormLabel(_AM_TOOLS_TIP, _AM_TOOLS_TIPS));
37
+    $checkbox_options = [
38
+        'updatexoopscache'    => _AM_TOOLS_UPDATEXOOPSCACHE,
39
+        'updatesmartycache'   => _AM_TOOLS_UPDATESMARTYCACHE,
40
+        'updatesmartycompile' => _AM_TOOLS_UPDATESMARTYCOMPILE,
41
+    ];
42
+    $checkbox         = new \XoopsFormCheckBox(_AM_TOOLS_OPTIONS, 'options', array_keys($checkbox_options));
43
+    $checkbox->addOptionArray($checkbox_options);
44
+    $form->addElement($checkbox);
45
+    $form->addElement(new \XoopsFormHidden('op', 'updatecache'));
46
+    $form->addElement(new \XoopsFormHidden('step', '1'));
47
+    $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
48
+    $form->display();
49
+    break;
50
+case 'updatecache':
51
+    if (1 == $_REQUEST['step']) {
52
+        $options  = implode('_', $_REQUEST['options']);
53
+        $url      = XOOPS_URL . "/modules/tools/admin/main.php?op=updatecache&step=2&options={$options}";
54
+        $updating = _AM_TOOLS_UPDATING;
55
+        $msg      = <<<EOF
56 56
     <div class="loading" style="text-align:center">
57 57
     <img src="../assets/images/loader.gif">
58 58
     <p>{$updating}</P>
@@ -66,31 +66,31 @@  discard block
 block discarded – undo
66 66
     <script type="text/JavaScript">setTimeout("redirect('{$url}');", 2000);</script>
67 67
 EOF;
68 68
 
69
-            echo $msg;
70
-        } elseif (2 == $_REQUEST['step']) {
71
-            $options = explode('_', $_REQUEST['options']);
72
-            foreach ($options as $k) {
73
-                if ('updatexoopscache' === $k) {
74
-                    $d = XOOPS_VAR_PATH . '/caches/xoops_cache';
75
-                    updatecache($d, 'php');
76
-                    updatecache($d, 'html');
77
-                    updatecache($d, 'tmp');
78
-                }
79
-                if ('updatesmartycache' === $k) {
80
-                    $d = XOOPS_VAR_PATH . '/caches/smarty_cache';
81
-                    updatecache($d, 'html');
82
-                    updatecache($d, 'tmp');
83
-                }
84
-                if ('updatesmartycompile' === $k) {
85
-                    $d = XOOPS_VAR_PATH . '/caches/smarty_compile';
86
-                    updatecache($d, 'php');
87
-                }
69
+        echo $msg;
70
+    } elseif (2 == $_REQUEST['step']) {
71
+        $options = explode('_', $_REQUEST['options']);
72
+        foreach ($options as $k) {
73
+            if ('updatexoopscache' === $k) {
74
+                $d = XOOPS_VAR_PATH . '/caches/xoops_cache';
75
+                updatecache($d, 'php');
76
+                updatecache($d, 'html');
77
+                updatecache($d, 'tmp');
78
+            }
79
+            if ('updatesmartycache' === $k) {
80
+                $d = XOOPS_VAR_PATH . '/caches/smarty_cache';
81
+                updatecache($d, 'html');
82
+                updatecache($d, 'tmp');
83
+            }
84
+            if ('updatesmartycompile' === $k) {
85
+                $d = XOOPS_VAR_PATH . '/caches/smarty_compile';
86
+                updatecache($d, 'php');
88 87
             }
89
-
90
-            redirect_header('main.php', 3, _AM_TOOLS_UPDATECACHESUCCESS);
91 88
         }
92 89
 
93
-        break;
90
+        redirect_header('main.php', 3, _AM_TOOLS_UPDATECACHESUCCESS);
91
+    }
92
+
93
+    break;
94 94
 }
95 95
 
96 96
 function updatecache($cacheDir, $type)
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 use Xmf\Module\Admin;
21 21
 
22
-require_once __DIR__ . '/admin_header.php';
22
+require_once __DIR__.'/admin_header.php';
23 23
 xoops_cp_header();
24 24
 
25 25
 //loadModuleAdminMenu(1, '');
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 switch ($op) {
32 32
     default:
33 33
     case 'main':
34
-        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
34
+        require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
35 35
         $form = new \XoopsThemeForm(_AM_TOOLS_INDEX, 'updatecache', 'main.php', 'post', true);
36 36
         $form->addElement(new \XoopsFormLabel(_AM_TOOLS_TIP, _AM_TOOLS_TIPS));
37 37
         $checkbox_options = [
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             'updatesmartycache'   => _AM_TOOLS_UPDATESMARTYCACHE,
40 40
             'updatesmartycompile' => _AM_TOOLS_UPDATESMARTYCOMPILE,
41 41
         ];
42
-        $checkbox         = new \XoopsFormCheckBox(_AM_TOOLS_OPTIONS, 'options', array_keys($checkbox_options));
42
+        $checkbox = new \XoopsFormCheckBox(_AM_TOOLS_OPTIONS, 'options', array_keys($checkbox_options));
43 43
         $checkbox->addOptionArray($checkbox_options);
44 44
         $form->addElement($checkbox);
45 45
         $form->addElement(new \XoopsFormHidden('op', 'updatecache'));
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     case 'updatecache':
51 51
         if (1 == $_REQUEST['step']) {
52 52
             $options  = implode('_', $_REQUEST['options']);
53
-            $url      = XOOPS_URL . "/modules/tools/admin/main.php?op=updatecache&step=2&options={$options}";
53
+            $url      = XOOPS_URL."/modules/tools/admin/main.php?op=updatecache&step=2&options={$options}";
54 54
             $updating = _AM_TOOLS_UPDATING;
55 55
             $msg      = <<<EOF
56 56
     <div class="loading" style="text-align:center">
@@ -71,18 +71,18 @@  discard block
 block discarded – undo
71 71
             $options = explode('_', $_REQUEST['options']);
72 72
             foreach ($options as $k) {
73 73
                 if ('updatexoopscache' === $k) {
74
-                    $d = XOOPS_VAR_PATH . '/caches/xoops_cache';
74
+                    $d = XOOPS_VAR_PATH.'/caches/xoops_cache';
75 75
                     updatecache($d, 'php');
76 76
                     updatecache($d, 'html');
77 77
                     updatecache($d, 'tmp');
78 78
                 }
79 79
                 if ('updatesmartycache' === $k) {
80
-                    $d = XOOPS_VAR_PATH . '/caches/smarty_cache';
80
+                    $d = XOOPS_VAR_PATH.'/caches/smarty_cache';
81 81
                     updatecache($d, 'html');
82 82
                     updatecache($d, 'tmp');
83 83
                 }
84 84
                 if ('updatesmartycompile' === $k) {
85
-                    $d = XOOPS_VAR_PATH . '/caches/smarty_compile';
85
+                    $d = XOOPS_VAR_PATH.'/caches/smarty_compile';
86 86
                     updatecache($d, 'php');
87 87
                 }
88 88
             }
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
     $d = dir($cacheDir);
99 99
     while (false !== ($entry = $d->read())) {
100 100
         if (preg_match("/.*\.{$type}$/", $entry)) {
101
-            unlink($cacheDir . '/' . $entry);
101
+            unlink($cacheDir.'/'.$entry);
102 102
         }
103 103
     }
104 104
     $d->close();
105 105
 }
106 106
 
107
-require_once __DIR__ . '/admin_footer.php';
107
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
modules/tools/admin/admin_footer.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
 $pathIcon32 = Xmf\Module\Admin::iconUrl('', 32);
24 24
 
25 25
 echo "<div class='adminfooter'>\n"
26
-     . "  <div style='text-align: center;'>\n"
27
-     . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
28
-     . "  </div>\n"
29
-     . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
30
-     . '</div>';
26
+        . "  <div style='text-align: center;'>\n"
27
+        . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
28
+        . "  </div>\n"
29
+        . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
30
+        . '</div>';
31 31
 
32 32
 
33 33
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      . "  <div style='text-align: center;'>\n"
27 27
      . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
28 28
      . "  </div>\n"
29
-     . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
29
+     . '  '._AM_MODULEADMIN_ADMIN_FOOTER."\n"
30 30
      . '</div>';
31 31
 
32 32
 
Please login to merge, or discard this patch.
modules/tools/admin/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     Utility
22 22
 };
23 23
 
24
-require_once __DIR__ . '/admin_header.php';
24
+require_once __DIR__.'/admin_header.php';
25 25
 // Display Admin header
26 26
 xoops_cp_header();
27 27
 $adminObject = Admin::getInstance();
@@ -39,4 +39,4 @@  discard block
 block discarded – undo
39 39
 /** @var Utility $utility */
40 40
 echo $utility::getServerStats();
41 41
 
42
-require_once __DIR__ . '/admin_footer.php';
42
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.