Completed
Branch master (5c4e1a)
by Michael
46s
created
xoops_trust_path/libs/altsys/controllers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 //$langman = D3LanguageManager::getInstance() ;
5 5
 //$langman->read( 'modinfo.php' , 'altsys' , 'altsys' ) ;
6 6
 
7
-if (file_exists(__DIR__ . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/modinfo.php')) {
8
-    require_once __DIR__ . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/modinfo.php';
9
-} elseif (file_exists(__DIR__ . '/language/english/modinfo.php')) {
10
-    require_once __DIR__ . '/language/english/modinfo.php';
7
+if (file_exists(__DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php')) {
8
+    require_once __DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php';
9
+} elseif (file_exists(__DIR__.'/language/english/modinfo.php')) {
10
+    require_once __DIR__.'/language/english/modinfo.php';
11 11
 }
12 12
 
13 13
 $controllers = [
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mymenusub/mytplsform.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,2 @@
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2
-require __DIR__ . '/mytplsadmin.php';
2
+require __DIR__.'/mytplsadmin.php';
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mypreferences.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
 //                     GIJOE <https://www.peak.ne.jp>                        //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php';
9
-require_once __DIR__ . '/include/gtickets.php';
10
-require_once __DIR__ . '/include/altsys_functions.php';
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+require_once __DIR__.'/include/gtickets.php';
10
+require_once __DIR__.'/include/altsys_functions.php';
11 11
 
12 12
 // check access right (needs module_admin of this module)
13 13
 if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         die('no configs');
39 39
     }
40 40
 
41
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
41
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
42 42
 
43 43
     $form = new \XoopsThemeForm(_MD_A_MYPREFERENCES_FORMTITLE, 'pref_form', 'index.php?mode=admin&lib=altsys&page=mypreferences&op=save');
44 44
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     // if has comments feature, need comment lang file
72 72
 
73 73
     if (1 == $module->getVar('hascomments') && !defined('_CM_TITLE')) {
74
-        require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/comment.php';
74
+        require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
75 75
     }
76 76
 
77 77
     // RMV-NOTIFY
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     // if has notification feature, need notification lang file
80 80
 
81 81
     if (1 == $module->getVar('hasnotification') && !defined('_NOT_NOTIFICATIONOPTIONS')) {
82
-        require_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php';
82
+        require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/notification.php';
83 83
     }
84 84
 
85 85
     $modname = $module->getVar('name');
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
     // }
94 94
 
95 95
     for ($i = 0; $i < $count; ++$i) {
96
-        $title_icon = ('encrypt' === $config[$i]->getVar('conf_valuetype')) ? '<img src="' . XOOPS_MODULE_URL . '/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype'
96
+        $title_icon = ('encrypt' === $config[$i]->getVar('conf_valuetype')) ? '<img src="'.XOOPS_MODULE_URL.'/legacy/admin/theme/icons/textfield_key.png" alt="Encrypted">' : ''; // support XCL 2.2.3 'encrypt' of 'conf_valuetype'
97 97
 
98
-        $title4tray = (!defined($config[$i]->getVar('conf_desc')) || '' == constant($config[$i]->getVar('conf_desc'))) ? (constant($config[$i]->getVar('conf_title')) . $title_icon) : (constant($config[$i]->getVar('conf_title'))
98
+        $title4tray = (!defined($config[$i]->getVar('conf_desc')) || '' == constant($config[$i]->getVar('conf_desc'))) ? (constant($config[$i]->getVar('conf_title')).$title_icon) : (constant($config[$i]->getVar('conf_title'))
99 99
                                                                                                                                                                                         . $title_icon
100 100
                                                                                                                                                                                         . '<br><br><span style="font-weight:normal;">'
101 101
                                                                                                                                                                                         . constant($config[$i]->getVar('conf_desc'))
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
                     $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
132 132
 
133
-                    $ele->addOption($optval, $optkey . $addBr);
133
+                    $ele->addOption($optval, $optkey.$addBr);
134 134
                 }
135 135
                 break;
136 136
             case 'select_multi':
@@ -151,31 +151,31 @@  discard block
 block discarded – undo
151 151
 
152 152
                     $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
153 153
 
154
-                    $ele->addOption($optval, $optkey . $addBr);
154
+                    $ele->addOption($optval, $optkey.$addBr);
155 155
                 }
156 156
                 break;
157 157
             case 'yesno':
158 158
                 $ele = new \XoopsFormRadioYN($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), _YES, _NO);
159 159
                 break;
160 160
             case 'group':
161
-                require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
161
+                require_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
162 162
                 $ele = new \XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false);
163 163
                 break;
164 164
             case 'group_multi':
165
-                require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
165
+                require_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
166 166
                 $ele = new \XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true);
167 167
                 break;
168 168
             case 'group_checkbox':
169
-                require_once __DIR__ . '/include/formcheckboxgroup.php';
169
+                require_once __DIR__.'/include/formcheckboxgroup.php';
170 170
                 $ele = new AltsysFormCheckboxGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput());
171 171
                 break;
172 172
             // RMV-NOTIFY: added 'user' and 'user_multi'
173 173
             case 'user':
174
-                require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
174
+                require_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
175 175
                 $ele = new \XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false);
176 176
                 break;
177 177
             case 'user_multi':
178
-                require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
178
+                require_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
179 179
                 $ele = new \XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true);
180 180
                 break;
181 181
             case 'password':
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             case 'textbox':
186 186
             default:
187 187
                 (method_exists('MyTextSanitizer', 'sGetInstance') && $myts = MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance();
188
-                $ele = new \XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, htmlspecialchars((string) $config[$i]->getConfValueForOutput()));
188
+                $ele = new \XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, htmlspecialchars((string)$config[$i]->getConfValueForOutput()));
189 189
                 break;
190 190
         }
191 191
 
@@ -219,10 +219,10 @@  discard block
 block discarded – undo
219 219
     $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
220 220
 
221 221
     if ($breadcrumbsObj->hasPaths()) {
222
-        $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences', _PREFERENCES);
222
+        $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mypreferences', _PREFERENCES);
223 223
     }
224 224
 
225
-    echo "<h3 style='text-align:" . _GLOBAL_LEFT . ";'>" . $module->getVar('name') . ' &nbsp; ' . _PREFERENCES . "</h3>\n";
225
+    echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>".$module->getVar('name').' &nbsp; '._PREFERENCES."</h3>\n";
226 226
 
227 227
     // GIJ patch end
228 228
 
@@ -241,10 +241,10 @@  discard block
 block discarded – undo
241 241
     //}
242 242
 
243 243
     if (!$xoopsGTicket->check(true, 'mypreferences')) {
244
-        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
244
+        redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
245 245
     }
246 246
 
247
-    require_once XOOPS_ROOT_PATH . '/class/template.php';
247
+    require_once XOOPS_ROOT_PATH.'/class/template.php';
248 248
 
249 249
     $xoopsTpl = new \XoopsTpl();
250 250
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
     //old xoops
254 254
 
255
-    $core_type = (int) altsys_get_core_type();
255
+    $core_type = (int)altsys_get_core_type();
256 256
 
257 257
     if ($core_type <= 10) {
258 258
         $xoopsTpl->clear_all_cache();
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
                         $imagefiles = &$imageHandler->getObjects(new \Criteria('tplset_name', $newtplset), true);
352 352
 
353 353
                         foreach (array_keys($imagefiles) as $i) {
354
-                            if (!$fp = fopen(XOOPS_CACHE_PATH . '/' . $newtplset . '_' . $imagefiles[$i]->getVar('imgsetimg_file'), 'wb')) {
354
+                            if (!$fp = fopen(XOOPS_CACHE_PATH.'/'.$newtplset.'_'.$imagefiles[$i]->getVar('imgsetimg_file'), 'wb')) {
355 355
                             } else {
356 356
                                 fwrite($fp, $imagefiles[$i]->getVar('imgsetimg_body'));
357 357
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mylangadmin.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -339,24 +339,24 @@
 block discarded – undo
339 339
 require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
340 340
 $tpl = new D3Tpl();
341 341
 $tpl->assign([
342
-                 'target_dirname' => $target_dirname,
343
-                 'target_mname' => $target_mname,
344
-                 'target_lang' => $target_lang,
345
-                 'languages' => $languages,
346
-                 'languages4disp' => $languages4disp,
347
-                 'target_file' => $target_file,
348
-                 'lang_files' => $lang_files,
349
-                 'langfile_constants' => $langfile_constants,
350
-                 'mylang_constants' => $mylang_constants,
351
-                 'use_my_language' => mb_strlen($langman->my_language) > 0,
352
-                 'mylang_file_name' => htmlspecialchars($mylang_unique_path, ENT_QUOTES | ENT_HTML5),
353
-                 'cache_file_name' => htmlspecialchars($cache_file_name, ENT_QUOTES | ENT_HTML5),
354
-                 'cache_file_mtime' => (int) $cache_file_mtime,
355
-                 'timezone_offset' => xoops_getUserTimestamp(0),
356
-                 'notice' => $notice4disp,
357
-                 'already_read' => $already_read,
358
-                 'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'altsys'),
359
-             ]);
342
+                    'target_dirname' => $target_dirname,
343
+                    'target_mname' => $target_mname,
344
+                    'target_lang' => $target_lang,
345
+                    'languages' => $languages,
346
+                    'languages4disp' => $languages4disp,
347
+                    'target_file' => $target_file,
348
+                    'lang_files' => $lang_files,
349
+                    'langfile_constants' => $langfile_constants,
350
+                    'mylang_constants' => $mylang_constants,
351
+                    'use_my_language' => mb_strlen($langman->my_language) > 0,
352
+                    'mylang_file_name' => htmlspecialchars($mylang_unique_path, ENT_QUOTES | ENT_HTML5),
353
+                    'cache_file_name' => htmlspecialchars($cache_file_name, ENT_QUOTES | ENT_HTML5),
354
+                    'cache_file_mtime' => (int) $cache_file_mtime,
355
+                    'timezone_offset' => xoops_getUserTimestamp(0),
356
+                    'notice' => $notice4disp,
357
+                    'already_read' => $already_read,
358
+                    'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'altsys'),
359
+                ]);
360 360
 $tpl->display('db:altsys_main_mylangadmin.tpl');
361 361
 
362 362
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@  discard block
 block discarded – undo
5 5
 //                       GIJOE <https://www.peak.ne.jp>                      //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php';
9
-require_once __DIR__ . '/include/gtickets.php';
10
-require_once __DIR__ . '/include/altsys_functions.php';
11
-require_once __DIR__ . '/include/lang_functions.php';
12
-require_once __DIR__ . '/class/D3LanguageManager.class.php';
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+require_once __DIR__.'/include/gtickets.php';
10
+require_once __DIR__.'/include/altsys_functions.php';
11
+require_once __DIR__.'/include/lang_functions.php';
12
+require_once __DIR__.'/class/D3LanguageManager.class.php';
13 13
 
14 14
 // only groups have 'module_admin' of 'altsys' can do that.
15 15
 $moduleHandler = xoops_getHandler('module');
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
 
33 33
 // check $xoopsModule
34 34
 if (!is_object($xoopsModule)) {
35
-    redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM);
35
+    redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM);
36 36
 }
37 37
 
38 38
 // set target_module if specified by $_GET['dirname']
39 39
 $moduleHandler = xoops_getHandler('module');
40 40
 if (!empty($_GET['dirname'])) {
41
-    $dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', $_GET['dirname']??'');
41
+    $dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', $_GET['dirname'] ?? '');
42 42
 
43 43
     $target_module = $moduleHandler->getByDirname($dirname);
44 44
 }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     $target_dirname4sql = addslashes($target_dirname);
54 54
 
55 55
 //    $target_mname = $target_module->getVar('name') . '&nbsp;' . sprintf('(%2.2f)', $target_module->getVar('version') / 100.0);
56
-    $target_mname = $target_module->getVar('name') . '&nbsp;' . sprintf('(%2.2f)', $target_module->getVar('version'));
56
+    $target_mname = $target_module->getVar('name').'&nbsp;'.sprintf('(%2.2f)', $target_module->getVar('version'));
57 57
 
58 58
 //    BrazilGoldIsAwesome
59 59
 
@@ -73,20 +73,20 @@  discard block
 block discarded – undo
73 73
 }
74 74
 
75 75
 // basic GET variables
76
-$target_lang = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['target_lang']??'');
76
+$target_lang = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['target_lang'] ?? '');
77 77
 if (empty($target_lang)) {
78 78
     $target_lang = $GLOBALS['xoopsConfig']['language'];
79 79
 }
80 80
 $target_lang4sql = addslashes($target_lang);
81
-$target_file = preg_replace('/[^0-9a-zA-Z_.-]/', '', @$_GET['target_file']??'');
81
+$target_file = preg_replace('/[^0-9a-zA-Z_.-]/', '', @$_GET['target_file'] ?? '');
82 82
 if (empty($target_file)) {
83 83
     $target_file = 'main.php';
84 84
 }
85 85
 
86 86
 // get $target_trustdirname
87 87
 $mytrustdirname = '';
88
-if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $target_dirname . '/mytrustdirname.php')) {
89
-    require XOOPS_ROOT_PATH . '/modules/' . $target_dirname . '/mytrustdirname.php';
88
+if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/mytrustdirname.php')) {
89
+    require XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/mytrustdirname.php';
90 90
 }
91 91
 $target_trustdirname = $mytrustdirname;
92 92
 
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 if (empty($target_trustdirname)) {
95 95
     // conventinal module
96 96
 
97
-    $baseDir = XOOPS_ROOT_PATH . '/modules/' . $target_dirname . '/language';
97
+    $baseDir = XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/language';
98 98
 } else {
99 99
     // D3 module
100 100
 
101
-    $baseDir = XOOPS_TRUST_PATH . '/modules/' . $target_trustdirname . '/language';
101
+    $baseDir = XOOPS_TRUST_PATH.'/modules/'.$target_trustdirname.'/language';
102 102
 }
103 103
 
104 104
 // make list of language and check $target_lang
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
         }
116 116
 
117 117
         if (is_dir("$baseDir/$file")) {
118
-            [$count] = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('altsys_language_constants') . " WHERE mid=$target_mid AND language='" . addslashes($file) . "'"));
118
+            [$count] = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('altsys_language_constants')." WHERE mid=$target_mid AND language='".addslashes($file)."'"));
119 119
 
120 120
             $languages[] = $file;
121 121
 
122
-            $languages4disp[] = $file . " ($count)";
122
+            $languages4disp[] = $file." ($count)";
123 123
         }
124 124
     }
125 125
 }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 }
130 130
 
131 131
 // get base directory seleced language
132
-$lang_base_dir = $baseDir . '/' . $target_lang;
132
+$lang_base_dir = $baseDir.'/'.$target_lang;
133 133
 if (!is_dir($lang_base_dir)) {
134 134
     altsys_mylangadmin_errordie($target_mname, _MYLANGADMIN_ERR_MODLANGINCOMPATIBLE);
135 135
 }
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
 // get user_values should be overridden
174 174
 $langfile_constants = [];
175 175
 foreach ($langfile_names as $name) {
176
-    [$value] = $db->fetchRow($db->query('SELECT value FROM ' . $db->prefix('altsys_language_constants') . " WHERE mid=$target_mid AND language='$target_lang4sql' AND name='" . addslashes($name) . "'"));
176
+    [$value] = $db->fetchRow($db->query('SELECT value FROM '.$db->prefix('altsys_language_constants')." WHERE mid=$target_mid AND language='$target_lang4sql' AND name='".addslashes($name)."'"));
177 177
 
178 178
     $langfile_constants[$name] = $value;
179 179
 }
180 180
 
181 181
 // constants defined in XOOPS_ROOT_PATH/my_language/(dirname)/...
182 182
 if ($langman->my_language) {
183
-    $mylang_unique_path = $langman->my_language . '/modules/' . $target_dirname . '/' . $target_lang . '/' . $target_file;
183
+    $mylang_unique_path = $langman->my_language.'/modules/'.$target_dirname.'/'.$target_lang.'/'.$target_file;
184 184
 
185 185
     $mylang_constants = array_map('htmlspecialchars', altsys_mylangadmin_get_constants_by_pcre($mylang_unique_path));
186 186
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     // Ticket Check
207 207
     global $xoopsGTicket;
208 208
     if (!$xoopsGTicket->check(true, 'altsys')) {
209
-        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
209
+        redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
210 210
     }
211 211
 
212 212
     // read original file
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
     // insert fingerprint of langfile_unique_path
217 217
 
218
-    $langfile_fingerprint = '_MYLANGADMIN_' . md5($langfile_unique_path);
218
+    $langfile_fingerprint = '_MYLANGADMIN_'.md5($langfile_unique_path);
219 219
 
220 220
     $file_contents = str_replace('<?php', "<?php\nif(!defined('$langfile_fingerprint'))define('$langfile_fingerprint',1);", $file_contents);
221 221
 
@@ -224,30 +224,30 @@  discard block
 block discarded – undo
224 224
     $overrides_counter = 0;
225 225
 
226 226
     foreach (array_reverse($langfile_names) as $name) {
227
-        $user_value = (@$_POST[$name]);//TODO Request
227
+        $user_value = (@$_POST[$name]); //TODO Request
228 228
 
229
-        $db->query('DELETE FROM ' . $db->prefix('altsys_language_constants') . " WHERE mid=$target_mid AND language='$target_lang4sql' AND name='" . addslashes($name) . "'");
229
+        $db->query('DELETE FROM '.$db->prefix('altsys_language_constants')." WHERE mid=$target_mid AND language='$target_lang4sql' AND name='".addslashes($name)."'");
230 230
 
231 231
         if ('' !== $user_value) {
232 232
             $overrides_counter++;
233 233
 
234 234
             // Update table
235 235
 
236
-            $db->query('INSERT INTO ' . $db->prefix('altsys_language_constants') . " (mid,language,name,value) VALUES ($target_mid,'$target_lang4sql','" . addslashes($name) . "','" . addslashes($user_value) . "')");
236
+            $db->query('INSERT INTO '.$db->prefix('altsys_language_constants')." (mid,language,name,value) VALUES ($target_mid,'$target_lang4sql','".addslashes($name)."','".addslashes($user_value)."')");
237 237
 
238 238
             // rewrite script for cache
239 239
 
240 240
             // comment-out the line of define()
241 241
 
242 242
             if (empty($constpref)) {
243
-                $from = '/.*define\s?\(\s*(["\'])' . preg_quote($name) . '(\\1).*\;.*/';
243
+                $from = '/.*define\s?\(\s*(["\'])'.preg_quote($name).'(\\1).*\;.*/';
244 244
             } else {
245
-                $from = '/.*define\s?\(\s*\$constpref\s*\.\s*(["\'])' . preg_quote(mb_substr($name, mb_strlen($constpref))) . '(\\1).*\;.*/';
245
+                $from = '/.*define\s?\(\s*\$constpref\s*\.\s*(["\'])'.preg_quote(mb_substr($name, mb_strlen($constpref))).'(\\1).*\;.*/';
246 246
             }
247 247
 
248
-            $to = '//$0' . "\ndefine('" . addslashes($name) . "','" . addslashes($user_value) . "');";
248
+            $to = '//$0'."\ndefine('".addslashes($name)."','".addslashes($user_value)."');";
249 249
 
250
-            $file_contents = preg_replace($from, $to, $file_contents??'');
250
+            $file_contents = preg_replace($from, $to, $file_contents ?? '');
251 251
         }
252 252
     }
253 253
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         unlink($cache_file_name);
272 272
     }
273 273
 
274
-    redirect_header('?mode=admin&lib=altsys&page=mylangadmin&dirname=' . $target_dirname . '&target_lang=' . rawurlencode($target_lang) . '&target_file=' . rawurlencode($target_file), 1, _MYLANGADMIN_CACHEUPDATED);
274
+    redirect_header('?mode=admin&lib=altsys&page=mylangadmin&dirname='.$target_dirname.'&target_lang='.rawurlencode($target_lang).'&target_file='.rawurlencode($target_file), 1, _MYLANGADMIN_CACHEUPDATED);
275 275
 
276 276
     exit;
277 277
 }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 } else {
301 301
     // X2 core etc.
302 302
 
303
-    $notice4disp = _MYLANGADMIN_MSG_HOWTOENABLED3LANGMAN4X2 . '<br>';
303
+    $notice4disp = _MYLANGADMIN_MSG_HOWTOENABLED3LANGMAN4X2.'<br>';
304 304
 
305 305
     $notice4disp .= '
306 306
         <h4>include/common.php</h4>
@@ -331,12 +331,12 @@  discard block
 block discarded – undo
331 331
 // breadcrumbs
332 332
 $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
333 333
 if ($breadcrumbsObj->hasPaths()) {
334
-    $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mylangadmin', _MI_ALTSYS_MENU_MYLANGADMIN);
334
+    $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mylangadmin', _MI_ALTSYS_MENU_MYLANGADMIN);
335 335
 
336 336
     $breadcrumbsObj->appendPath('', $target_mname);
337 337
 }
338 338
 
339
-require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
339
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
340 340
 $tpl = new D3Tpl();
341 341
 $tpl->assign([
342 342
                  'target_dirname' => $target_dirname,
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
                  'use_my_language' => mb_strlen($langman->my_language) > 0,
352 352
                  'mylang_file_name' => htmlspecialchars($mylang_unique_path, ENT_QUOTES | ENT_HTML5),
353 353
                  'cache_file_name' => htmlspecialchars($cache_file_name, ENT_QUOTES | ENT_HTML5),
354
-                 'cache_file_mtime' => (int) $cache_file_mtime,
354
+                 'cache_file_mtime' => (int)$cache_file_mtime,
355 355
                  'timezone_offset' => xoops_getUserTimestamp(0),
356 356
                  'notice' => $notice4disp,
357 357
                  'already_read' => $already_read,
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/mytplsadmin.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -444,18 +444,18 @@  discard block
 block discarded – undo
444 444
             }
445 445
 
446 446
             echo "<td class='{$evenodd}{$class}'>"
447
-                 . formatTimestamp($tpl['tpl_lastmodified'], 'm')
448
-                 . '<br>'
449
-                 . mb_substr($fingerprint, 0, 16)
450
-                 . "<br><input type='checkbox' name='{$tplset4disp}_check[{$tpl_file}]' value='1'> &nbsp; <a href='?mode=admin&amp;lib=altsys&amp;page=mytplsform&amp;tpl_file="
451
-                 . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES | ENT_HTML5)
452
-                 . '&amp;tpl_tplset='
453
-                 . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES | ENT_HTML5)
454
-                 . '&amp;dirname='
455
-                 . htmlspecialchars($target_dirname, ENT_QUOTES | ENT_HTML5)
456
-                 . "'>"
457
-                 . _EDIT
458
-                 . "</a> ($numrows)</td>\n";
447
+                    . formatTimestamp($tpl['tpl_lastmodified'], 'm')
448
+                    . '<br>'
449
+                    . mb_substr($fingerprint, 0, 16)
450
+                    . "<br><input type='checkbox' name='{$tplset4disp}_check[{$tpl_file}]' value='1'> &nbsp; <a href='?mode=admin&amp;lib=altsys&amp;page=mytplsform&amp;tpl_file="
451
+                    . htmlspecialchars($tpl['tpl_file'], ENT_QUOTES | ENT_HTML5)
452
+                    . '&amp;tpl_tplset='
453
+                    . htmlspecialchars($tpl['tpl_tplset'], ENT_QUOTES | ENT_HTML5)
454
+                    . '&amp;dirname='
455
+                    . htmlspecialchars($target_dirname, ENT_QUOTES | ENT_HTML5)
456
+                    . "'>"
457
+                    . _EDIT
458
+                    . "</a> ($numrows)</td>\n";
459 459
         }
460 460
     }
461 461
 
@@ -490,10 +490,10 @@  discard block
 block discarded – undo
490 490
 
491 491
     echo "\t\t<td class='head'>
492 492
             " . ('default' == $tplset && '_custom' != $target_dirname ? '' : "<input name='del_do[{$tplset4disp}]' type='submit' value='"
493
-                                                                             . _DELETE
494
-                                                                             . "' onclick='return altsys_mytpladmin_check_copy_submit(\""
495
-                                                                             . _MYTPLSADMIN_CNF_DELETE_SELECTED_TEMPLATES
496
-                                                                             . "\", \"{$tplset4disp}_\", false);'><br><br>") . '
493
+                                                                                . _DELETE
494
+                                                                                . "' onclick='return altsys_mytpladmin_check_copy_submit(\""
495
+                                                                                . _MYTPLSADMIN_CNF_DELETE_SELECTED_TEMPLATES
496
+                                                                                . "\", \"{$tplset4disp}_\", false);'><br><br>") . '
497 497
             ' . _MYTPLSADMIN_CAPTION_COPYTO . ":
498 498
             <select name='copy_to[{$tplset4disp}]'>
499 499
                 " . str_replace('<option value=\'' . $tplset4disp . '\'>' . $tplset4disp . '</option>', '', $tplset_options) . "
Please login to merge, or discard this patch.
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@  discard block
 block discarded – undo
5 5
 //                      GIJOE <https://www.peak.ne.jp>                       //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php';
9
-require_once __DIR__ . '/include/gtickets.php';
10
-require_once __DIR__ . '/include/altsys_functions.php';
11
-require_once __DIR__ . '/include/tpls_functions.php';
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+require_once __DIR__.'/include/gtickets.php';
10
+require_once __DIR__.'/include/altsys_functions.php';
11
+require_once __DIR__.'/include/tpls_functions.php';
12 12
 
13 13
 // only groups have 'module_admin' of 'altsys' can do that.
14 14
 $moduleHandler = xoops_getHandler('module');
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 // check $xoopsModule
32 32
 if (!is_object($xoopsModule)) {
33
-    redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM);
33
+    redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM);
34 34
 }
35 35
 
36 36
 // set target_module if specified by $_GET['dirname']
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     $target_dirname4sql = addslashes($target_dirname);
52 52
 
53
-    $target_mname = $target_module->getVar('name') . '&nbsp;' . sprintf('(%2.2f)', $target_module->getVar('version') / 100.0);
53
+    $target_mname = $target_module->getVar('name').'&nbsp;'.sprintf('(%2.2f)', $target_module->getVar('version') / 100.0);
54 54
 
55 55
 //$query4redirect = '?dirname='.urlencode(strip_tags($_GET['dirname'])) ;
56 56
 } elseif ('_custom' == @$_GET['dirname']) {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     // Ticket Check
89 89
 
90 90
     if (!$xoopsGTicket->check()) {
91
-        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
91
+        redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
92 92
     }
93 93
 
94 94
     $tplset_from = ($_POST['clone_tplset_from']);
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
         tplsadmin_die(_MYTPLSADMIN_ERR_INVALIDSETNAME, $target_dirname);
106 106
     }
107 107
 
108
-    [$is_exist] = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($tplset_to) . "'"));
108
+    [$is_exist] = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='".addslashes($tplset_to)."'"));
109 109
 
110 110
     if ($is_exist) {
111 111
         tplsadmin_die(_MYTPLSADMIN_ERR_DUPLICATEDSETNAME, $target_dirname);
112 112
     }
113 113
 
114
-    [$is_exist] = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('tplset') . " WHERE tplset_name='" . addslashes($tplset_to) . "'"));
114
+    [$is_exist] = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('tplset')." WHERE tplset_name='".addslashes($tplset_to)."'"));
115 115
 
116 116
     if ($is_exist) {
117 117
         tplsadmin_die(_MYTPLSADMIN_ERR_DUPLICATEDSETNAME, $target_dirname);
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
 
120 120
     // insert tplset table
121 121
 
122
-    $db->query('INSERT INTO ' . $db->prefix('tplset') . " SET tplset_name='" . addslashes($tplset_to) . "', tplset_desc='Created by tplsadmin', tplset_created=UNIX_TIMESTAMP()");
122
+    $db->query('INSERT INTO '.$db->prefix('tplset')." SET tplset_name='".addslashes($tplset_to)."', tplset_desc='Created by tplsadmin', tplset_created=UNIX_TIMESTAMP()");
123 123
 
124 124
     tplsadmin_copy_templates_db2db($tplset_from, $tplset_to, "tpl_module='$target_dirname4sql'");
125 125
 
126
-    redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $target_dirname, 1, _MYTPLSADMIN_DBUPDATED);
126
+    redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$target_dirname, 1, _MYTPLSADMIN_DBUPDATED);
127 127
 
128 128
     exit;
129 129
 }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             // Ticket Check
136 136
 
137 137
             if (!$xoopsGTicket->check()) {
138
-                redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
138
+                redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
139 139
             }
140 140
 
141 141
             $tplset_from = ($tplset_from_tmp);
@@ -157,10 +157,10 @@  discard block
 block discarded – undo
157 157
 
158 158
                 $tplfile = ($tplfile_tmp);
159 159
 
160
-                tplsadmin_copy_templates_db2db($tplset_from, $tplset_to, "tpl_file='" . addslashes($tplfile) . "'");
160
+                tplsadmin_copy_templates_db2db($tplset_from, $tplset_to, "tpl_file='".addslashes($tplfile)."'");
161 161
             }
162 162
 
163
-            redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $target_dirname, 1, _MYTPLSADMIN_DBUPDATED);
163
+            redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$target_dirname, 1, _MYTPLSADMIN_DBUPDATED);
164 164
 
165 165
             exit;
166 166
         }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     // Ticket Check
173 173
 
174 174
     if (!$xoopsGTicket->check()) {
175
-        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
175
+        redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
176 176
     }
177 177
 
178 178
     if (empty($_POST['copyf2db_to'])) {
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
 
193 193
         $tplfile = ($tplfile_tmp);
194 194
 
195
-        tplsadmin_copy_templates_f2db($tplset_to, "tpl_file='" . addslashes($tplfile) . "'");
195
+        tplsadmin_copy_templates_f2db($tplset_to, "tpl_file='".addslashes($tplfile)."'");
196 196
     }
197 197
 
198
-    redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $target_dirname, 1, _MYTPLSADMIN_DBUPDATED);
198
+    redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$target_dirname, 1, _MYTPLSADMIN_DBUPDATED);
199 199
 
200 200
     exit;
201 201
 }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             // Ticket Check
208 208
 
209 209
             if (!$xoopsGTicket->check()) {
210
-                redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
210
+                redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
211 211
             }
212 212
 
213 213
             $tplset_from = ($tplset_from_tmp);
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
                 tplsadmin_die(_MYTPLSADMIN_ERR_NOTPLFILE, $target_dirname);
221 221
             }
222 222
 
223
-            require_once XOOPS_ROOT_PATH . '/class/template.php';
223
+            require_once XOOPS_ROOT_PATH.'/class/template.php';
224 224
 
225 225
             $tpl = new \XoopsTpl();
226 226
 
@@ -233,24 +233,24 @@  discard block
 block discarded – undo
233 233
 
234 234
                 $tplfile = ($tplfile_tmp);
235 235
 
236
-                $result = $db->query('SELECT tpl_id FROM ' . $db->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($tplset_from) . "' AND tpl_file='" . addslashes($tplfile) . "'");
236
+                $result = $db->query('SELECT tpl_id FROM '.$db->prefix('tplfile')." WHERE tpl_tplset='".addslashes($tplset_from)."' AND tpl_file='".addslashes($tplfile)."'");
237 237
 
238 238
                 while ([$tpl_id] = $db->fetchRow($result)) {
239
-                    $tpl_id = (int) $tpl_id;
239
+                    $tpl_id = (int)$tpl_id;
240 240
 
241
-                    $db->query('DELETE FROM ' . $db->prefix('tplfile') . " WHERE tpl_id=$tpl_id");
241
+                    $db->query('DELETE FROM '.$db->prefix('tplfile')." WHERE tpl_id=$tpl_id");
242 242
 
243
-                    $db->query('DELETE FROM ' . $db->prefix('tplsource') . " WHERE tpl_id=$tpl_id");
243
+                    $db->query('DELETE FROM '.$db->prefix('tplsource')." WHERE tpl_id=$tpl_id");
244 244
                 }
245 245
 
246 246
                 // remove templates_c
247 247
 
248
-                $tpl->clearCache('db:' . $tplfile);
248
+                $tpl->clearCache('db:'.$tplfile);
249 249
 
250
-                $tpl->clearCompiledTemplate('db:' . $tplfile);
250
+                $tpl->clearCompiledTemplate('db:'.$tplfile);
251 251
             }
252 252
 
253
-            redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $target_dirname, 1, _MYTPLSADMIN_DBUPDATED);
253
+            redirect_header('?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$target_dirname, 1, _MYTPLSADMIN_DBUPDATED);
254 254
 
255 255
             exit;
256 256
         }
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 // get tplsets
294 294
 $tplsetHandler = xoops_getHandler('tplset');
295 295
 $tplsets = array_keys($tplsetHandler->getList());
296
-$sql = 'SELECT DISTINCT tpl_tplset FROM ' . $db->prefix('tplfile') . " ORDER BY tpl_tplset='default' DESC,tpl_tplset";
296
+$sql = 'SELECT DISTINCT tpl_tplset FROM '.$db->prefix('tplfile')." ORDER BY tpl_tplset='default' DESC,tpl_tplset";
297 297
 $srs = $db->query($sql);
298 298
 while ([$tplset] = $db->fetchRow($srs)) {
299 299
     if (!in_array($tplset, $tplsets, true)) {
@@ -322,18 +322,18 @@  discard block
 block discarded – undo
322 322
 }
323 323
 
324 324
 // get tpl_file owned by the module
325
-$sql = 'SELECT tpl_file,tpl_desc,tpl_type,COUNT(tpl_id) FROM ' . $db->prefix('tplfile') . " WHERE tpl_module='$target_dirname4sql' GROUP BY tpl_file, tpl_desc,tpl_type,tpl_id ORDER BY tpl_file ";
325
+$sql = 'SELECT tpl_file,tpl_desc,tpl_type,COUNT(tpl_id) FROM '.$db->prefix('tplfile')." WHERE tpl_module='$target_dirname4sql' GROUP BY tpl_file, tpl_desc,tpl_type,tpl_id ORDER BY tpl_file ";
326 326
 $frs = $db->query($sql);
327 327
 
328 328
 if (!$frs instanceof \mysqli_result) {
329
-    \trigger_error($db->errno() . ' ' . $db->error(), \E_USER_ERROR);
329
+    \trigger_error($db->errno().' '.$db->error(), \E_USER_ERROR);
330 330
 }
331 331
 
332 332
 
333 333
 xoops_cp_header();
334 334
 
335 335
 // css display
336
-require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php';
336
+require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php';
337 337
 $tpl = new D3Tpl();
338 338
 echo '<style scoped="scoped">';
339 339
 $tpl->display('db:altsys_inc_mytplsadmin.css');
@@ -348,27 +348,27 @@  discard block
 block discarded – undo
348 348
 // breadcrumbs
349 349
 $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
350 350
 if ($breadcrumbsObj->hasPaths()) {
351
-    $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin', _MI_ALTSYS_MENU_MYTPLSADMIN);
351
+    $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsadmin', _MI_ALTSYS_MENU_MYTPLSADMIN);
352 352
 
353 353
     $breadcrumbsObj->appendPath('', $target_mname);
354 354
 }
355 355
 
356
-echo "<h3 style='text-align:" . _GLOBAL_LEFT . ";'>" . _MYTPLSADMIN_H3_MODULE . " : $target_mname</h3>\n";
356
+echo "<h3 style='text-align:"._GLOBAL_LEFT.";'>"._MYTPLSADMIN_H3_MODULE." : $target_mname</h3>\n";
357 357
 
358 358
 // link to create a new custom template
359 359
 if ('_custom' == $target_dirname) {
360
-    echo "<a href='index.php?mode=admin&lib=altsys&page=mytplsform&tpl_tplset=default'>" . _MYTPLSADMIN_CREATENEWCUSTOMTEMPLATE . "</a>\n";
360
+    echo "<a href='index.php?mode=admin&lib=altsys&page=mytplsform&tpl_tplset=default'>"._MYTPLSADMIN_CREATENEWCUSTOMTEMPLATE."</a>\n";
361 361
 }
362 362
 
363 363
 // beggining of table & form
364 364
 echo "
365
-    <form name='MainForm' action='?mode=admin&amp;lib=altsys&amp;page=mytplsadmin&amp;dirname=" . htmlspecialchars($target_dirname, ENT_QUOTES | ENT_HTML5) . "' method='post'>
366
-    " . $xoopsGTicket->getTicketHtml(__LINE__) . "
365
+    <form name='MainForm' action='?mode=admin&amp;lib=altsys&amp;page=mytplsadmin&amp;dirname=" . htmlspecialchars($target_dirname, ENT_QUOTES | ENT_HTML5)."' method='post'>
366
+    " . $xoopsGTicket->getTicketHtml(__LINE__)."
367 367
     <table class='outer altsys_mytplsadmin'>
368 368
         <tr>
369
-            <th>" . _MYTPLSADMIN_TH_NAME . '</th>
370
-            <th>' . _MYTPLSADMIN_TH_TYPE . "</th>
371
-            <th><input type='checkbox' title=" . _MYTPLSADMIN_TITLE_CHECKALL . " onclick=\"with(document.MainForm){for(i=0;i<length;i++){if(elements[i].type==='checkbox'&&elements[i].name.indexOf('basecheck')>=0){elements[i].checked=this.checked;}}}\">" . _MYTPLSADMIN_TH_FILE . "</th>
369
+            <th>" . _MYTPLSADMIN_TH_NAME.'</th>
370
+            <th>' . _MYTPLSADMIN_TH_TYPE."</th>
371
+            <th><input type='checkbox' title=" . _MYTPLSADMIN_TITLE_CHECKALL." onclick=\"with(document.MainForm){for(i=0;i<length;i++){if(elements[i].type==='checkbox'&&elements[i].name.indexOf('basecheck')>=0){elements[i].checked=this.checked;}}}\">"._MYTPLSADMIN_TH_FILE."</th>
372 372
             $tplsets_th4disp
373 373
         </tr>\n";
374 374
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 
378 378
 
379 379
 if (!$frs instanceof \mysqli_result) {
380
-    \trigger_error($db->errno() . ' ' . $db->error(), \E_USER_ERROR);
380
+    \trigger_error($db->errno().' '.$db->error(), \E_USER_ERROR);
381 381
 }
382 382
 // template ROWS
383 383
 while (false !== ([$tpl_file, $tpl_desc, $type, $count] = $db->fetchRow($frs))) {
@@ -391,11 +391,11 @@  discard block
 block discarded – undo
391 391
         <tr>
392 392
             <td class='$evenodd'>
393 393
                 <dl>
394
-                    <dt>" . htmlspecialchars($tpl_file, ENT_QUOTES | ENT_HTML5) . '</dt>
395
-                    <dd>' . htmlspecialchars($tpl_desc, ENT_QUOTES | ENT_HTML5) . "</dd>
394
+                    <dt>".htmlspecialchars($tpl_file, ENT_QUOTES | ENT_HTML5).'</dt>
395
+                    <dd>' . htmlspecialchars($tpl_desc, ENT_QUOTES | ENT_HTML5)."</dd>
396 396
                 </dl>
397 397
             </td>
398
-            <td class='$evenodd'>" . $type . '<br>(' . $count . ")</td>\n";
398
+            <td class='$evenodd'>".$type.'<br>('.$count.")</td>\n";
399 399
 
400 400
     // the base file template column
401 401
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 
407 407
         $fingerprints[$fingerprint] = '';
408 408
 
409
-        echo "<td class='$evenodd'>" . formatTimestamp(filemtime($basefilepath), 'm') . '<br>' . mb_substr($fingerprint, 0, 16) . "<br><input type='checkbox' name='basecheck[$tpl_file]' value='1'></td>\n";
409
+        echo "<td class='$evenodd'>".formatTimestamp(filemtime($basefilepath), 'm').'<br>'.mb_substr($fingerprint, 0, 16)."<br><input type='checkbox' name='basecheck[$tpl_file]' value='1'></td>\n";
410 410
 
411 411
         $fingerprint_class_count = 0;
412 412
     } else {
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 
423 423
         // query for templates in db
424 424
 
425
-        $drs = $db->query('SELECT * FROM ' . $db->prefix('tplfile') . ' f NATURAL LEFT JOIN ' . $db->prefix('tplsource') . " s WHERE tpl_file='" . addslashes($tpl_file) . "' AND tpl_tplset='" . addslashes($tplset) . "'");
425
+        $drs = $db->query('SELECT * FROM '.$db->prefix('tplfile').' f NATURAL LEFT JOIN '.$db->prefix('tplsource')." s WHERE tpl_file='".addslashes($tpl_file)."' AND tpl_tplset='".addslashes($tplset)."'");
426 426
 
427 427
         $numrows = $db->getRowsNum($drs);
428 428
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
         if (empty($tpl['tpl_id'])) {
432 432
             echo "<td class='$evenodd'>($numrows)</td>\n";
433 433
         } else {
434
-            $fingerprint = tplsadmin_get_fingerprint(explode("\n", $tpl['tpl_source']??''));
434
+            $fingerprint = tplsadmin_get_fingerprint(explode("\n", $tpl['tpl_source'] ?? ''));
435 435
 
436 436
             if (isset($fingerprints[$fingerprint])) {
437 437
                 $class = $fingerprints[$fingerprint];
@@ -466,23 +466,23 @@  discard block
 block discarded – undo
466 466
 echo "
467 467
     <tr>
468 468
         <td class='head'>
469
-            " . _MYTPLSADMIN_CREATE_NEW_TPLSET . ': <br>
470
-            ' . _MYTPLSADMIN_CAPTION_BASE . ":
469
+            " . _MYTPLSADMIN_CREATE_NEW_TPLSET.': <br>
470
+            ' . _MYTPLSADMIN_CAPTION_BASE.":
471 471
             <select name='clone_tplset_from'>
472 472
                 $tplset_options
473
-                <option value='_blank_'>" . _MYTPLSADMIN_OPT_BLANKSET . '</option>
473
+                <option value='_blank_'>"._MYTPLSADMIN_OPT_BLANKSET.'</option>
474 474
             </select>
475 475
             <br>
476
-            ' . _MYTPLSADMIN_CAPTION_SETNAME . ": <input type='text' name='clone_tplset_to' size='8' maxlength='16'> <input type='submit' name='clone_tplset_do' value='" . _MYTPLSADMIN_BTN_NEWTPLSET . "'>
476
+            ' . _MYTPLSADMIN_CAPTION_SETNAME.": <input type='text' name='clone_tplset_to' size='8' maxlength='16'> <input type='submit' name='clone_tplset_do' value='"._MYTPLSADMIN_BTN_NEWTPLSET."'>
477 477
         </td>
478 478
         <td class='head'></td>
479 479
         <td class='head'>
480
-            " . _MYTPLSADMIN_CAPTION_COPYTO . ":
480
+            " . _MYTPLSADMIN_CAPTION_COPYTO.":
481 481
             <select name='copyf2db_to'>
482 482
                 $tplset_options
483 483
             </select>
484 484
             <br>
485
-            <input name='copyf2db_do' type='submit' value='" . _MYTPLSADMIN_BTN_COPY . "' onclick='return altsys_mytpladmin_check_copy_submit(\"" . _MYTPLSADMIN_CNF_COPY_SELECTED_TEMPLATES . "\", \"base\", true);'>
485
+            <input name='copyf2db_do' type='submit' value='"._MYTPLSADMIN_BTN_COPY."' onclick='return altsys_mytpladmin_check_copy_submit(\""._MYTPLSADMIN_CNF_COPY_SELECTED_TEMPLATES."\", \"base\", true);'>
486 486
         </td>\n";
487 487
 
488 488
 foreach ($tplsets as $tplset) {
@@ -493,12 +493,12 @@  discard block
 block discarded – undo
493 493
                                                                              . _DELETE
494 494
                                                                              . "' onclick='return altsys_mytpladmin_check_copy_submit(\""
495 495
                                                                              . _MYTPLSADMIN_CNF_DELETE_SELECTED_TEMPLATES
496
-                                                                             . "\", \"{$tplset4disp}_\", false);'><br><br>") . '
497
-            ' . _MYTPLSADMIN_CAPTION_COPYTO . ":
496
+                                                                             . "\", \"{$tplset4disp}_\", false);'><br><br>").'
497
+            ' . _MYTPLSADMIN_CAPTION_COPYTO.":
498 498
             <select name='copy_to[{$tplset4disp}]'>
499
-                " . str_replace('<option value=\'' . $tplset4disp . '\'>' . $tplset4disp . '</option>', '', $tplset_options) . "
499
+                ".str_replace('<option value=\''.$tplset4disp.'\'>'.$tplset4disp.'</option>', '', $tplset_options)."
500 500
             </select>
501
-            <input name='copy_do[{$tplset4disp}]' type='submit' value='" . _MYTPLSADMIN_BTN_COPY . "' onclick='return altsys_mytpladmin_check_copy_submit(\"" . _MYTPLSADMIN_CNF_COPY_SELECTED_TEMPLATES . "\", \"{$tplset4disp}_\", true);'>
501
+            <input name='copy_do[{$tplset4disp}]' type='submit' value='"._MYTPLSADMIN_BTN_COPY."' onclick='return altsys_mytpladmin_check_copy_submit(\""._MYTPLSADMIN_CNF_COPY_SELECTED_TEMPLATES."\", \"{$tplset4disp}_\", true);'>
502 502
         </td>\n";
503 503
 }
504 504
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/myblocksadmin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@  discard block
 block discarded – undo
5 5
 //                       GIJOE <https://www.peak.ne.jp>                      //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php';
9
-require_once __DIR__ . '/include/gtickets.php';
10
-require_once __DIR__ . '/include/altsys_functions.php';
11
-require_once __DIR__ . '/include/mygrouppermform.php';
12
-require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+require_once __DIR__.'/include/gtickets.php';
10
+require_once __DIR__.'/include/altsys_functions.php';
11
+require_once __DIR__.'/include/mygrouppermform.php';
12
+require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
13 13
 
14 14
 include_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
15 15
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 //        $myba = MyBlocksAdminForX20S::getInstance();
41 41
 //        break;
42 42
     default:
43
-        require_once __DIR__ . '/class/MyBlocksAdmin.class.php';
43
+        require_once __DIR__.'/class/MyBlocksAdmin.class.php';
44 44
         $myba = MyBlocksAdmin::getInstance();
45 45
         break;
46 46
 }
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/oninstall.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
     {
163 163
         if (is_array(@$GLOBALS['ret'])) {
164 164
             foreach ($GLOBALS['ret'] as $message) {
165
-					$log->add( strip_tags( (string) $message ) );
165
+                    $log->add( strip_tags( (string) $message ) );
166 166
             }
167 167
         }
168 168
 
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3
-eval(' function xoops_module_install_' . $mydirname . '( $module ) { return altsys_oninstall_base( $module , \'' . $mydirname . '\' ) ; } ');
3
+eval(' function xoops_module_install_'.$mydirname.'( $module ) { return altsys_oninstall_base( $module , \''.$mydirname.'\' ) ; } ');
4 4
 
5 5
 if (!function_exists('altsys_oninstall_base')) {
6 6
     /**
@@ -26,25 +26,25 @@  discard block
 block discarded – undo
26 26
 
27 27
         // set weight=0
28 28
 
29
-        $db->queryF('UPDATE ' . $db->prefix('modules') . " SET weight=0 WHERE mid=$mid");
29
+        $db->queryF('UPDATE '.$db->prefix('modules')." SET weight=0 WHERE mid=$mid");
30 30
 
31 31
         /*************** END ALTSYS SPECIFIC PART ******************/
32 32
 
33 33
         // TABLES (loading mysql.sql)
34 34
 
35
-        $sql_file_path = __DIR__ . '/sql/mysql.sql';
35
+        $sql_file_path = __DIR__.'/sql/mysql.sql';
36 36
 
37
-        $prefix_mod = $db->prefix() . '_' . $mydirname;
37
+        $prefix_mod = $db->prefix().'_'.$mydirname;
38 38
 
39 39
         if (file_exists($sql_file_path)) {
40
-            $ret[] = 'SQL file found at <b>' . htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5) . '</b>.<br> Creating tables...';
40
+            $ret[] = 'SQL file found at <b>'.htmlspecialchars($sql_file_path, ENT_QUOTES | ENT_HTML5).'</b>.<br> Creating tables...';
41 41
 
42
-            if (is_file(XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php')) {
43
-                require_once XOOPS_ROOT_PATH . '/class/database/oldsqlutility.php';
42
+            if (is_file(XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php')) {
43
+                require_once XOOPS_ROOT_PATH.'/class/database/oldsqlutility.php';
44 44
 
45 45
                 $sqlutil = new OldSqlUtility();
46 46
             } else {
47
-                require_once XOOPS_ROOT_PATH . '/class/database/sqlutility.php';
47
+                require_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php';
48 48
 
49 49
                 $sqlutil = new SqlUtility();
50 50
             }
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
                 $prefixed_query = $sqlutil::prefixQuery($piece, $prefix_mod);
60 60
 
61 61
                 if (!$prefixed_query) {
62
-                    $ret[] = 'Invalid SQL <b>' . htmlspecialchars($piece, ENT_QUOTES | ENT_HTML5) . '</b><br>';
62
+                    $ret[] = 'Invalid SQL <b>'.htmlspecialchars($piece, ENT_QUOTES | ENT_HTML5).'</b><br>';
63 63
 
64 64
                     return false;
65 65
                 }
66 66
 
67 67
                 if (!$db->query($prefixed_query[0])) {
68
-                    $ret[] = '<b>' . htmlspecialchars($db->error(), ENT_QUOTES | ENT_HTML5) . '</b><br>';
68
+                    $ret[] = '<b>'.htmlspecialchars($db->error(), ENT_QUOTES | ENT_HTML5).'</b><br>';
69 69
 
70 70
                     //var_dump( $db->error() ) ;
71 71
 
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
                 }
74 74
 
75 75
                 if (!in_array($prefixed_query[4], $created_tables, true)) {
76
-                    $ret[] = 'Table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4], ENT_QUOTES | ENT_HTML5) . '</b> created.<br>';
76
+                    $ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4], ENT_QUOTES | ENT_HTML5).'</b> created.<br>';
77 77
 
78 78
                     $created_tables[] = $prefixed_query[4];
79 79
                 } else {
80
-                    $ret[] = 'Data inserted to table <b>' . htmlspecialchars($prefix_mod . '_' . $prefixed_query[4], ENT_QUOTES | ENT_HTML5) . '</b>.</br>';
80
+                    $ret[] = 'Data inserted to table <b>'.htmlspecialchars($prefix_mod.'_'.$prefixed_query[4], ENT_QUOTES | ENT_HTML5).'</b>.</br>';
81 81
                 }
82 82
             }
83 83
         }
@@ -86,18 +86,18 @@  discard block
 block discarded – undo
86 86
 
87 87
         $tplfileHandler = xoops_getHandler('tplfile');
88 88
 
89
-        $tpl_path = __DIR__ . '/templates';
89
+        $tpl_path = __DIR__.'/templates';
90 90
 
91
-        if ($handler = @opendir($tpl_path . '/')) {
91
+        if ($handler = @opendir($tpl_path.'/')) {
92 92
             while (false !== ($file = readdir($handler))) {
93 93
                 if ('.' == mb_substr($file, 0, 1)) {
94 94
                     continue;
95 95
                 }
96 96
 
97
-                $file_path = $tpl_path . '/' . $file;
97
+                $file_path = $tpl_path.'/'.$file;
98 98
 
99 99
                 if (is_file($file_path)) {
100
-                    $mtime = (int) (@filemtime($file_path));
100
+                    $mtime = (int)(@filemtime($file_path));
101 101
 
102 102
                     $tplfile = $tplfileHandler->create();
103 103
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
                     $tplfile->setVar('tpl_tplset', 'default');
109 109
 
110
-                    $tplfile->setVar('tpl_file', $mydirname . '_' . $file);
110
+                    $tplfile->setVar('tpl_file', $mydirname.'_'.$file);
111 111
 
112 112
                     $tplfile->setVar('tpl_desc', '', true);
113 113
 
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
                     $tplfile->setVar('tpl_type', 'module');
121 121
 
122 122
                     if (!$tplfileHandler->insert($tplfile)) {
123
-                        $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> to the database.</span><br>';
123
+                        $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> to the database.</span><br>';
124 124
                     } else {
125 125
                         $tplid = $tplfile->getVar('tpl_id');
126 126
 
127
-                        $ret[] = 'Template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> added to the database. (ID: <b>' . $tplid . '</b>)<br>';
127
+                        $ret[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> added to the database. (ID: <b>'.$tplid.'</b>)<br>';
128 128
 
129
-                        require_once XOOPS_TRUST_PATH . '/libs/altsys/include/altsys_functions.php';
129
+                        require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php';
130 130
 
131 131
                         altsys_clear_templates_c();
132 132
 
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
             closedir($handler);
146 146
         }
147 147
 
148
-        require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
148
+        require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
149 149
 
150
-        require_once XOOPS_ROOT_PATH . '/class/template.php';
150
+        require_once XOOPS_ROOT_PATH.'/class/template.php';
151 151
 
152 152
         xoops_template_clear_module_cache($mid);
153 153
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     {
163 163
         if (is_array(@$GLOBALS['ret'])) {
164 164
             foreach ($GLOBALS['ret'] as $message) {
165
-					$log->add( strip_tags( (string) $message ) );
165
+					$log->add(strip_tags((string)$message));
166 166
             }
167 167
         }
168 168
 
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/compilehookadmin.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
 //                       GIJOE <https://www.peak.ne.jp>                      //
6 6
 // ------------------------------------------------------------------------- //
7 7
 
8
-require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php';
9
-require_once __DIR__ . '/include/gtickets.php';
10
-require_once __DIR__ . '/include/altsys_functions.php';
8
+require_once __DIR__.'/class/AltsysBreadcrumbs.class.php';
9
+require_once __DIR__.'/include/gtickets.php';
10
+require_once __DIR__.'/include/altsys_functions.php';
11 11
 
12 12
 // this page can be called only from altsys
13 13
 // if( $xoopsModule->getVar('dirname') != 'altsys' ) die( 'this page can be called only from altsys' ) ;
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     'enclosebybordereddiv' => [
34 34
         'pre' => '<div class="altsys_tplsadmin_frame" style="border:1px solid black;word-wrap:break-word;">',
35
-        'post' => '<br><a href="' . XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsform&amp;tpl_file=%1$s" style="color:red;">Edit:<br>%1$s</a></div>',
35
+        'post' => '<br><a href="'.XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=mytplsform&amp;tpl_file=%1$s" style="color:red;">Edit:<br>%1$s</a></div>',
36 36
         'success_msg' => _TPLSADMIN_FMT_MSG_ENCLOSEBYBORDEREDDIV,
37 37
         'dt' => _TPLSADMIN_DT_ENCLOSEBYBORDEREDDIV,
38 38
         'dd' => _TPLSADMIN_DD_ENCLOSEBYBORDEREDDIV,
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     ],
42 42
 
43 43
     'hooksavevars' => [
44
-        'pre' => '<?php require_once \'' . XOOPS_TRUST_PATH . ',$this) ; ?>',
44
+        'pre' => '<?php require_once \''.XOOPS_TRUST_PATH.',$this) ; ?>',
45 45
         'post' => '',
46 46
         'success_msg' => _TPLSADMIN_FMT_MSG_HOOKSAVEVARS,
47 47
         'dt' => _TPLSADMIN_DT_HOOKSAVEVARS,
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
     // Ticket Check
71 71
 
72 72
     if (!$xoopsGTicket->check()) {
73
-        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
73
+        redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
74 74
     }
75 75
 
76
-    if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) {
76
+    if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) {
77 77
         while (false !== ($file = readdir($handler))) {
78 78
             if (!empty($_POST['clearcache'])) {
79 79
                 // judging template cache '*.php'
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 continue;
87 87
             }
88 88
 
89
-            $file_path = XOOPS_COMPILE_PATH . '/' . $file;
89
+            $file_path = XOOPS_COMPILE_PATH.'/'.$file;
90 90
 
91 91
             @unlink($file_path);
92 92
         }
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
         // Ticket Check
106 106
 
107 107
         if (!$xoopsGTicket->check()) {
108
-            redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
108
+            redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors());
109 109
         }
110 110
 
111
-        if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) {
111
+        if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) {
112 112
             $file_count = 0;
113 113
 
114 114
             while (false !== ($file = readdir($handler))) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                     $skip_mode = false;
133 133
                 }
134 134
 
135
-                $file_path = XOOPS_COMPILE_PATH . '/' . $file;
135
+                $file_path = XOOPS_COMPILE_PATH.'/'.$file;
136 136
 
137 137
                 $file_bodies = file($file_path);
138 138
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 // insert "pre" command before the compiled cache
162 162
 
163 163
                 if ($compile_hook['pre'] && !$skip_mode) {
164
-                    fwrite($fw, sprintf($compile_hook['pre'], htmlspecialchars($tpl_name, ENT_QUOTES | ENT_HTML5)) . "\r\n");
164
+                    fwrite($fw, sprintf($compile_hook['pre'], htmlspecialchars($tpl_name, ENT_QUOTES | ENT_HTML5))."\r\n");
165 165
                 }
166 166
 
167 167
                 // rest of template cache
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                 // insert "post" command after the compiled cache
174 174
 
175 175
                 if ($compile_hook['post'] && !$skip_mode) {
176
-                    fwrite($fw, "\r\n" . sprintf($compile_hook['post'], htmlspecialchars($tpl_name, ENT_QUOTES | ENT_HTML5)));
176
+                    fwrite($fw, "\r\n".sprintf($compile_hook['post'], htmlspecialchars($tpl_name, ENT_QUOTES | ENT_HTML5)));
177 177
                 }
178 178
 
179 179
                 fclose($fw);
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 // count template vars & compiled caches
204 204
 $compiledcache_num = 0;
205 205
 $tplsvars_num = 0;
206
-if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) {
206
+if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) {
207 207
     while (false !== ($file = readdir($handler))) {
208 208
         if (0 === strncmp($file, 'tplsvars_', 9)) {
209 209
             $tplsvars_num++;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 }
215 215
 
216 216
 // get tplsets
217
-$sql = 'SELECT tplset_name,COUNT(DISTINCT tpl_file) FROM ' . $xoopsDB->prefix('tplset') . ' LEFT JOIN ' . $xoopsDB->prefix('tplfile') . " ON tplset_name=tpl_tplset GROUP BY tpl_tplset, tplset_name, tpl_file ORDER BY tpl_tplset='default' DESC,tpl_tplset";
217
+$sql = 'SELECT tplset_name,COUNT(DISTINCT tpl_file) FROM '.$xoopsDB->prefix('tplset').' LEFT JOIN '.$xoopsDB->prefix('tplfile')." ON tplset_name=tpl_tplset GROUP BY tpl_tplset, tplset_name, tpl_file ORDER BY tpl_tplset='default' DESC,tpl_tplset";
218 218
 $srs = $xoopsDB->query($sql);
219 219
 $tplset_options = "<option value=''>----</option>\n";
220 220
 while ([$tplset, $tpl_count] = $xoopsDB->fetchRow($srs)) {
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
 // breadcrumbs
236 236
 $breadcrumbsObj = AltsysBreadcrumbs::getInstance();
237
-$breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=compilehookadmin', _MI_ALTSYS_MENU_COMPILEHOOKADMIN);
237
+$breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&amp;lib=altsys&amp;page=compilehookadmin', _MI_ALTSYS_MENU_COMPILEHOOKADMIN);
238 238
 
239 239
 echo "
240 240
     <style>
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             <dl>
253 253
                 <dt>
254 254
                     {$compile_hook['dt']}
255
-                    <input type='submit' name='$command' id='$command' value='" . _GO . "' onclick='return confirm(\"{$compile_hook['conf_msg']}\");'>
255
+                    <input type='submit' name='$command' id='$command' value='"._GO."' onclick='return confirm(\"{$compile_hook['conf_msg']}\");'>
256 256
                 </dt>
257 257
                 <dd>
258 258
                     {$compile_hook['dd']}
@@ -264,26 +264,26 @@  discard block
 block discarded – undo
264 264
 
265 265
 echo "
266 266
         <p style='margin:10px;'>
267
-            " . _TPLSADMIN_NUMCAP_COMPILEDCACHES . ": <strong>$compiledcache_num</strong>
268
-            <input type='submit' name='clearcache' value='" . _DELETE . "' onclick='return confirm(\"" . _TPLSADMIN_CNF_DELETEOK . "\");'>
267
+            " . _TPLSADMIN_NUMCAP_COMPILEDCACHES.": <strong>$compiledcache_num</strong>
268
+            <input type='submit' name='clearcache' value='"._DELETE."' onclick='return confirm(\""._TPLSADMIN_CNF_DELETEOK."\");'>
269 269
 
270 270
         </p>
271 271
         <p style='margin:10px;'>
272
-            " . _TPLSADMIN_NUMCAP_TPLSVARS . ": <strong>$tplsvars_num</strong>
273
-            <input type='submit' name='cleartplsvars' value='" . _DELETE . "' onclick='return confirm(\"" . _TPLSADMIN_CNF_DELETEOK . "\");'>
272
+            " . _TPLSADMIN_NUMCAP_TPLSVARS.": <strong>$tplsvars_num</strong>
273
+            <input type='submit' name='cleartplsvars' value='"._DELETE."' onclick='return confirm(\""._TPLSADMIN_CNF_DELETEOK."\");'>
274 274
 
275 275
         </p>
276
-        " . $xoopsGTicket->getTicketHtml(__LINE__) . "
276
+        " . $xoopsGTicket->getTicketHtml(__LINE__)."
277 277
     </form>
278 278
 
279 279
     <form action='?mode=admin&amp;lib=altsys&amp;page=get_tplsvarsinfo' method='post' class='odd' style='margin: 40px;' target='_blank'>
280 280
         <p>
281 281
             <dl>
282 282
                 <dt>
283
-                    " . _TPLSADMIN_DT_GETTPLSVARSINFO_DW . '
283
+                    " . _TPLSADMIN_DT_GETTPLSVARSINFO_DW.'
284 284
                 </dt>
285 285
                 <dd>
286
-                    ' . _TPLSADMIN_DD_GETTPLSVARSINFO_DW . "
286
+                    ' . _TPLSADMIN_DD_GETTPLSVARSINFO_DW."
287 287
                     <br>
288 288
                     <input type='submit' name='as_dw_extension_zip' value='zip'>
289 289
                     <input type='submit' name='as_dw_extension_tgz' value='tar.gz'>
@@ -296,10 +296,10 @@  discard block
 block discarded – undo
296 296
         <p>
297 297
             <dl>
298 298
                 <dt>
299
-                    " . _TPLSADMIN_DT_GETTEMPLATES . '
299
+                    " . _TPLSADMIN_DT_GETTEMPLATES.'
300 300
                 </dt>
301 301
                 <dd>
302
-                    ' . _TPLSADMIN_DD_GETTEMPLATES . "
302
+                    ' . _TPLSADMIN_DD_GETTEMPLATES."
303 303
                     <br>
304 304
                     <select name='tplset'>$tplset_options</select>
305 305
                     <input type='submit' name='download_zip' value='zip'>
@@ -313,14 +313,14 @@  discard block
 block discarded – undo
313 313
         <p>
314 314
             <dl>
315 315
                 <dt>
316
-                    " . _TPLSADMIN_DT_PUTTEMPLATES . '
316
+                    "._TPLSADMIN_DT_PUTTEMPLATES.'
317 317
                 </dt>
318 318
                 <dd>
319
-                    ' . _TPLSADMIN_DD_PUTTEMPLATES . "
319
+                    ' . _TPLSADMIN_DD_PUTTEMPLATES."
320 320
                     <br>
321 321
                     <select name='tplset'>$tplset_options</select>
322 322
                     <input type='file' name='tplset_archive' size='60'>
323
-                    <input type='submit' value='" . _SUBMIT . "'>
323
+                    <input type='submit' value='"._SUBMIT."'>
324 324
                 </dd>
325 325
             </dl>
326 326
         </p>
Please login to merge, or discard this patch.
xoops_trust_path/libs/altsys/preload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 //admin page
7 7
 if ($root->mController->_mStrategy) {
8 8
     if (mb_strtolower(get_class($root->mController->_mStrategy)) == mb_strtolower('Legacy_AdminControllerStrategy')) {
9
-        require_once __DIR__ . '/include/altsys_functions.php';
9
+        require_once __DIR__.'/include/altsys_functions.php';
10 10
 
11 11
         // language file (modinfo.php)
12 12
 
@@ -14,4 +14,4 @@  discard block
 block discarded – undo
14 14
     }
15 15
 }
16 16
 // load altsys newly gticket class for other modules
17
-require_once XOOPS_TRUST_PATH . '/libs/altsys/include/gtickets.php';
17
+require_once XOOPS_TRUST_PATH.'/libs/altsys/include/gtickets.php';
Please login to merge, or discard this patch.