Completed
Push — master ( 4f0041...4952f5 )
by Michael
27:47 queued 27:20
created
modules/tools/include/blockform.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
16 16
  * @since           2.00
17 17
  * @author          Susheng Yang <[email protected]>
18 18
  */
19
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
20
-$form = new \XoopsForm(_EDIT . _AM_TOOLS_BC_BLOCK, 'form', 'blockscall.php', 'post', true);
19
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
20
+$form = new \XoopsForm(_EDIT._AM_TOOLS_BC_BLOCK, 'form', 'blockscall.php', 'post', true);
21 21
 $form->addElement(new \XoopsFormLabel(_AM_TOOLS_BC_NAME, $block_data['name']));
22 22
 $form->addElement(new \XoopsFormText(_AM_TOOLS_BC_DESCRIPTION, 'desc', 60, 255, $block_data['desciption']));
23 23
 if ('' != $block_data['template']) {
24
-    $form->addElement(new \XoopsFormLabel(_AM_TOOLS_BC_CONTENT, '<a href="blockscall.php?op=edittpl&amp;bid=' . $block_data['bid'] . '">' . _AM_TOOLS_BC_EDITTPL . '</a>'));
24
+    $form->addElement(new \XoopsFormLabel(_AM_TOOLS_BC_CONTENT, '<a href="blockscall.php?op=edittpl&amp;bid='.$block_data['bid'].'">'._AM_TOOLS_BC_EDITTPL.'</a>'));
25 25
 }
26 26
 if (false !== $block_data['edit_form']) {
27 27
     $form->addElement(new \XoopsFormLabel(_AM_TOOLS_BC_OPTIONS, $block_data['edit_form']));
Please login to merge, or discard this patch.
modules/tools/preloads/core.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
      */
27 27
     public static function eventCoreIncludeCommonEnd($args)
28 28
     {
29
-        require_once __DIR__ . '/autoloader.php';
29
+        require_once __DIR__.'/autoloader.php';
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
modules/tools/preloads/autoloader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@  discard block
 block discarded – undo
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
-        $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__)));
9
+        $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__)));
10 10
 
11 11
         // base directory for the namespace prefix
12
-        $baseDir = dirname(__DIR__) . '/class/';
12
+        $baseDir = dirname(__DIR__).'/class/';
13 13
 
14 14
         // does the class use the namespace prefix?
15 15
         $len = mb_strlen($prefix);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         // replace the namespace prefix with the base directory, replace namespace
25 25
         // separators with directory separators in the relative class name, append
26 26
         // with .php
27
-        $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php';
27
+        $file = $baseDir.str_replace('\\', '/', $relativeClass).'.php';
28 28
 
29 29
         // if the file exists, require it
30 30
         if (is_file($file)) {
Please login to merge, or discard this patch.
modules/tools/class/Helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
     {
70 70
         $ret = false;
71 71
 
72
-        $class = __NAMESPACE__ . '\\' . \ucfirst($name) . 'Handler';
72
+        $class = __NAMESPACE__.'\\'.\ucfirst($name).'Handler';
73 73
         if (!\class_exists($class)) {
74 74
             throw new \RuntimeException("Class '$class' not found");
75 75
         }
Please login to merge, or discard this patch.
modules/tools/class/BlocksCall.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@
 block discarded – undo
49 49
         if (!$edit_func) {
50 50
             return false;
51 51
         }
52
-        if (is_file(XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file'))) {
52
+        if (is_file(XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file'))) {
53 53
             xoops_loadLanguage('blocks', $this->getVar('dirname'));
54 54
 
55
-            require_once XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file');
55
+            require_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file');
56 56
             $options   = explode('|', $this->getVar('options'));
57 57
             $edit_form = $edit_func($options);
58 58
             if (!$edit_form) {
Please login to merge, or discard this patch.
modules/tools/testdata/index.php 2 patches
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;
@@ -75,20 +75,20 @@  discard block
 block discarded – undo
75 75
     $tables = \Xmf\Module\Helper::getHelper($moduleDirName)->getModule()->getInfo('tables');
76 76
 
77 77
     $language = 'english/';
78
-    if (is_dir(__DIR__ . '/' . $xoopsConfig['language'])) {
79
-        $language = $xoopsConfig['language'] . '/';
78
+    if (is_dir(__DIR__.'/'.$xoopsConfig['language'])) {
79
+        $language = $xoopsConfig['language'].'/';
80 80
     }
81 81
 
82 82
     // load module tables
83 83
     foreach ($tables as $table) {
84
-        $tabledata = Yaml::readWrapped($language . $table . '.yml');
84
+        $tabledata = Yaml::readWrapped($language.$table.'.yml');
85 85
         TableLoad::truncateTable($table);
86 86
         TableLoad::loadTableFromArray($table, $tabledata);
87 87
     }
88 88
 
89 89
     // load permissions
90 90
     $table     = 'group_permission';
91
-    $tabledata = Yaml::readWrapped($language . $table . '.yml');
91
+    $tabledata = Yaml::readWrapped($language.$table.'.yml');
92 92
     $mid       = \Xmf\Module\Helper::getHelper($moduleDirName)->getModule()->getVar('mid');
93 93
     loadTableFromArrayWithReplace($table, $tabledata, 'gperm_modid', $mid);
94 94
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             $utility::rcopy($src, $dest);
102 102
         }
103 103
     }
104
-    \redirect_header('../admin/index.php', 1, \constant('CO_' . $moduleDirNameUpper . '_' . 'LOAD_SAMPLEDATA_SUCCESS'));
104
+    \redirect_header('../admin/index.php', 1, \constant('CO_'.$moduleDirNameUpper.'_'.'LOAD_SAMPLEDATA_SUCCESS'));
105 105
 }
106 106
 
107 107
 /**
@@ -115,26 +115,26 @@  discard block
 block discarded – undo
115 115
     $helper             = Helper::getInstance();
116 116
     $tables             = $helper->getModule()->getInfo('tables');
117 117
 
118
-    $languageFolder = __DIR__ . '/' . $xoopsConfig['language'];
119
-    if (!file_exists($languageFolder . '/')) {
120
-        Utility::createFolder($languageFolder . '/');
118
+    $languageFolder = __DIR__.'/'.$xoopsConfig['language'];
119
+    if (!file_exists($languageFolder.'/')) {
120
+        Utility::createFolder($languageFolder.'/');
121 121
     }
122
-    $exportFolder = $languageFolder . '/Exports-' . date('Y-m-d-H-i-s') . '/';
122
+    $exportFolder = $languageFolder.'/Exports-'.date('Y-m-d-H-i-s').'/';
123 123
     Utility::createFolder($exportFolder);
124 124
 
125 125
     // save module tables
126 126
     foreach ($tables as $table) {
127
-        TableLoad::saveTableToYamlFile($table, $exportFolder . $table . '.yml');
127
+        TableLoad::saveTableToYamlFile($table, $exportFolder.$table.'.yml');
128 128
     }
129 129
 
130 130
     // save permissions
131 131
     $criteria = new \CriteriaCompo();
132 132
     $criteria->add(new \Criteria('gperm_modid', $helper->getModule()->getVar('mid')));
133 133
     $skipColumns[] = 'gperm_id';
134
-    TableLoad::saveTableToYamlFile('group_permission', $exportFolder . 'group_permission.yml', $criteria, $skipColumns);
134
+    TableLoad::saveTableToYamlFile('group_permission', $exportFolder.'group_permission.yml', $criteria, $skipColumns);
135 135
     unset($criteria);
136 136
 
137
-    \redirect_header('../admin/index.php', 1, \constant('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA_SUCCESS'));
137
+    \redirect_header('../admin/index.php', 1, \constant('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA_SUCCESS'));
138 138
 }
139 139
 
140 140
 /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         //
153 153
         //        redirect_header('../admin/index.php', 1, constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_SUCCESS'));
154 154
     } catch (\Throwable $e) {
155
-        exit(constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_ERROR'));
155
+        exit(constant('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_ERROR'));
156 156
     }
157 157
 }
158 158
 
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
     $prefixedTable = $db->prefix($table);
177 177
     $count         = 0;
178 178
 
179
-    $sql = 'DELETE FROM ' . $prefixedTable . ' WHERE `' . $search . '`=' . $db->quote($replace);
179
+    $sql = 'DELETE FROM '.$prefixedTable.' WHERE `'.$search.'`='.$db->quote($replace);
180 180
 
181 181
     $result = $db->queryF($sql);
182 182
 
183 183
     foreach ($data as $row) {
184
-        $insertInto  = 'INSERT INTO ' . $prefixedTable . ' (';
184
+        $insertInto  = 'INSERT INTO '.$prefixedTable.' (';
185 185
         $valueClause = ' VALUES (';
186 186
         $first       = true;
187 187
         foreach ($row as $column => $value) {
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
             }
201 201
         }
202 202
 
203
-        $sql = $insertInto . ') ' . $valueClause . ')';
203
+        $sql = $insertInto.') '.$valueClause.')';
204 204
 
205 205
         $result = $db->queryF($sql);
206 206
         if (false !== $result) {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 /**
215 215
  *
216 216
  */
217
-function clearSampleData(){
217
+function clearSampleData() {
218 218
     $moduleDirName      = \basename(\dirname(__DIR__));
219 219
     $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
220 220
     $helper             = Helper::getInstance();
@@ -225,5 +225,5 @@  discard block
 block discarded – undo
225 225
     foreach ($tables as $table) {
226 226
         \Xmf\Database\TableLoad::truncateTable($table);
227 227
     }
228
-    redirect_header($helper->url('admin/index.php'), 1, constant('CO_' . $moduleDirNameUpper . '_' . 'CLEAR_SAMPLEDATA_OK'));
228
+    redirect_header($helper->url('admin/index.php'), 1, constant('CO_'.$moduleDirNameUpper.'_'.'CLEAR_SAMPLEDATA_OK'));
229 229
 }
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
 /**
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
             }
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
     $d = dir($cacheDir);
103 103
     while (false !== ($entry = $d->read())) {
104 104
         if (preg_match("/.*\.{$type}$/", $entry)) {
105
-            unlink($cacheDir . '/' . $entry);
105
+            unlink($cacheDir.'/'.$entry);
106 106
         }
107 107
     }
108 108
     $d->close();
109 109
 }
110 110
 
111
-require_once __DIR__ . '/admin_footer.php';
111
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
modules/tools/include/config.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -20,26 +20,26 @@  discard block
 block discarded – undo
20 20
 $moduleDirName      = \basename(\dirname(__DIR__));
21 21
 $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
22 22
 
23
-return (object)[
24
-    'name'           => $moduleDirNameUpper . ' Module Configurator',
23
+return (object) [
24
+    'name'           => $moduleDirNameUpper.' Module Configurator',
25 25
     'paths'          => [
26 26
         'dirname'    => $moduleDirName,
27
-        'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
28
-        'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
29
-        'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
30
-        'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
31
-        'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
27
+        'admin'      => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
28
+        'modPath'    => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
29
+        'modUrl'     => XOOPS_URL.'/modules/'.$moduleDirName,
30
+        'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
31
+        'uploadUrl'  => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
32 32
     ],
33 33
     'uploadFolders'  => [
34
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
35
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
36
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
34
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
35
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/category',
36
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots',
37 37
         //XOOPS_UPLOAD_PATH . '/flags'
38 38
     ],
39 39
     'copyBlankFiles' => [
40
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
41
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
42
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
40
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
41
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/category',
42
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots',
43 43
         //XOOPS_UPLOAD_PATH . '/flags'
44 44
     ],
45 45
 
@@ -79,5 +79,5 @@  discard block
 block discarded – undo
79 79
         //            'totalsubmitted'  => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]),
80 80
     ],
81 81
     'modCopyright'    => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
82
-                     <img src='" . Admin::iconUrl('xoopsmicrobutton.gif') . "' alt='XOOPS Project'></a>",
82
+                     <img src='" . Admin::iconUrl('xoopsmicrobutton.gif')."' alt='XOOPS Project'></a>",
83 83
 ];
Please login to merge, or discard this patch.
modules/tools/include/common.php 1 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.