@@ -5,11 +5,11 @@ discard block |
||
5 | 5 | // GIJOE <http://www.peak.ne.jp/> // |
6 | 6 | // ------------------------------------------------------------------------- // |
7 | 7 | |
8 | -require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php'; |
|
9 | -include_once __DIR__ . '/include/gtickets.php'; |
|
10 | -include_once __DIR__ . '/include/altsys_functions.php'; |
|
11 | -include_once __DIR__ . '/include/lang_functions.php'; |
|
12 | -include_once __DIR__ . '/class/D3LanguageManager.class.php'; |
|
8 | +require_once __DIR__.'/class/AltsysBreadcrumbs.class.php'; |
|
9 | +include_once __DIR__.'/include/gtickets.php'; |
|
10 | +include_once __DIR__.'/include/altsys_functions.php'; |
|
11 | +include_once __DIR__.'/include/lang_functions.php'; |
|
12 | +include_once __DIR__.'/class/D3LanguageManager.class.php'; |
|
13 | 13 | |
14 | 14 | // only groups have 'module_admin' of 'altsys' can do that. |
15 | 15 | $module_handler = xoops_getHandler('module'); |
@@ -32,7 +32,7 @@ discard block |
||
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'] |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | $target_dirname4sql = addslashes($target_dirname); |
54 | 54 | |
55 | - $target_mname = $target_module->getVar('name') . ' ' . sprintf('(%2.2f)', $target_module->getVar('version') / 100.0); |
|
55 | + $target_mname = $target_module->getVar('name').' '.sprintf('(%2.2f)', $target_module->getVar('version') / 100.0); |
|
56 | 56 | |
57 | 57 | //$query4redirect = '?dirname='.urlencode(strip_tags($_GET['dirname'])) ; |
58 | 58 | } else { |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | |
83 | 83 | // get $target_trustdirname |
84 | 84 | $mytrustdirname = ''; |
85 | -if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $target_dirname . '/mytrustdirname.php')) { |
|
86 | - require XOOPS_ROOT_PATH . '/modules/' . $target_dirname . '/mytrustdirname.php'; |
|
85 | +if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/mytrustdirname.php')) { |
|
86 | + require XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/mytrustdirname.php'; |
|
87 | 87 | } |
88 | 88 | $target_trustdirname = $mytrustdirname; |
89 | 89 | |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | if (empty($target_trustdirname)) { |
92 | 92 | // conventinal module |
93 | 93 | |
94 | - $baseDir = XOOPS_ROOT_PATH . '/modules/' . $target_dirname . '/language'; |
|
94 | + $baseDir = XOOPS_ROOT_PATH.'/modules/'.$target_dirname.'/language'; |
|
95 | 95 | } else { |
96 | 96 | // D3 module |
97 | 97 | |
98 | - $baseDir = XOOPS_TRUST_PATH . '/modules/' . $target_trustdirname . '/language'; |
|
98 | + $baseDir = XOOPS_TRUST_PATH.'/modules/'.$target_trustdirname.'/language'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | // make list of language and check $target_lang |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | if (is_dir("$baseDir/$file")) { |
115 | - list($count) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('altsys_language_constants') . " WHERE mid=$target_mid AND language='" . addslashes($file) . "'")); |
|
115 | + list($count) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('altsys_language_constants')." WHERE mid=$target_mid AND language='".addslashes($file)."'")); |
|
116 | 116 | |
117 | 117 | $languages[] = $file; |
118 | 118 | |
119 | - $languages4disp[] = $file . " ($count)"; |
|
119 | + $languages4disp[] = $file." ($count)"; |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | // get base directory seleced language |
129 | -$lang_base_dir = $baseDir . '/' . $target_lang; |
|
129 | +$lang_base_dir = $baseDir.'/'.$target_lang; |
|
130 | 130 | if (!is_dir($lang_base_dir)) { |
131 | 131 | altsys_mylangadmin_errordie($target_mname, _MYLANGADMIN_ERR_MODLANGINCOMPATIBLE); |
132 | 132 | } |
@@ -170,14 +170,14 @@ discard block |
||
170 | 170 | // get user_values should be overridden |
171 | 171 | $langfile_constants = []; |
172 | 172 | foreach ($langfile_names as $name) { |
173 | - list($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) . "'")); |
|
173 | + list($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)."'")); |
|
174 | 174 | |
175 | 175 | $langfile_constants[$name] = $value; |
176 | 176 | } |
177 | 177 | |
178 | 178 | // constants defined in XOOPS_ROOT_PATH/my_language/(dirname)/... |
179 | 179 | if ($langman->my_language) { |
180 | - $mylang_unique_path = $langman->my_language . '/modules/' . $target_dirname . '/' . $target_lang . '/' . $target_file; |
|
180 | + $mylang_unique_path = $langman->my_language.'/modules/'.$target_dirname.'/'.$target_lang.'/'.$target_file; |
|
181 | 181 | |
182 | 182 | $mylang_constants = array_map('htmlspecialchars', altsys_mylangadmin_get_constants_by_pcre($mylang_unique_path)); |
183 | 183 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | // Ticket Check |
204 | 204 | |
205 | 205 | if (!$xoopsGTicket->check(true, 'altsys')) { |
206 | - redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors()); |
|
206 | + redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors()); |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | // read original file |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | // insert fingerprint of langfile_unique_path |
214 | 214 | |
215 | - $langfile_fingerprint = '_MYLANGADMIN_' . md5($langfile_unique_path); |
|
215 | + $langfile_fingerprint = '_MYLANGADMIN_'.md5($langfile_unique_path); |
|
216 | 216 | |
217 | 217 | $file_contents = str_replace('<?php', "<?php\nif(!defined('$langfile_fingerprint'))define('$langfile_fingerprint',1);", $file_contents); |
218 | 218 | |
@@ -223,26 +223,26 @@ discard block |
||
223 | 223 | foreach (array_reverse($langfile_names) as $name) { |
224 | 224 | $user_value = (@$_POST[$name]); |
225 | 225 | |
226 | - $db->query('DELETE FROM ' . $db->prefix('altsys_language_constants') . " WHERE mid=$target_mid AND language='$target_lang4sql' AND name='" . addslashes($name) . "'"); |
|
226 | + $db->query('DELETE FROM '.$db->prefix('altsys_language_constants')." WHERE mid=$target_mid AND language='$target_lang4sql' AND name='".addslashes($name)."'"); |
|
227 | 227 | |
228 | 228 | if ('' !== $user_value) { |
229 | 229 | $overrides_counter++; |
230 | 230 | |
231 | 231 | // Update table |
232 | 232 | |
233 | - $db->query('INSERT INTO ' . $db->prefix('altsys_language_constants') . " (mid,language,name,value) VALUES ($target_mid,'$target_lang4sql','" . addslashes($name) . "','" . addslashes($user_value) . "')"); |
|
233 | + $db->query('INSERT INTO '.$db->prefix('altsys_language_constants')." (mid,language,name,value) VALUES ($target_mid,'$target_lang4sql','".addslashes($name)."','".addslashes($user_value)."')"); |
|
234 | 234 | |
235 | 235 | // rewrite script for cache |
236 | 236 | |
237 | 237 | // comment-out the line of define() |
238 | 238 | |
239 | 239 | if (empty($constpref)) { |
240 | - $from = '/.*define\s?\(\s*(["\'])' . preg_quote($name) . '(\\1).*\;.*/'; |
|
240 | + $from = '/.*define\s?\(\s*(["\'])'.preg_quote($name).'(\\1).*\;.*/'; |
|
241 | 241 | } else { |
242 | - $from = '/.*define\s?\(\s*\$constpref\s*\.\s*(["\'])' . preg_quote(mb_substr($name, mb_strlen($constpref))) . '(\\1).*\;.*/'; |
|
242 | + $from = '/.*define\s?\(\s*\$constpref\s*\.\s*(["\'])'.preg_quote(mb_substr($name, mb_strlen($constpref))).'(\\1).*\;.*/'; |
|
243 | 243 | } |
244 | 244 | |
245 | - $to = '//$0' . "\ndefine('" . addslashes($name) . "','" . addslashes($user_value) . "');"; |
|
245 | + $to = '//$0'."\ndefine('".addslashes($name)."','".addslashes($user_value)."');"; |
|
246 | 246 | |
247 | 247 | $file_contents = preg_replace($from, $to, $file_contents); |
248 | 248 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | unlink($cache_file_name); |
269 | 269 | } |
270 | 270 | |
271 | - redirect_header('?mode=admin&lib=altsys&page=mylangadmin&dirname=' . $target_dirname . '&target_lang=' . rawurlencode($target_lang) . '&target_file=' . rawurlencode($target_file), 1, _MYLANGADMIN_CACHEUPDATED); |
|
271 | + redirect_header('?mode=admin&lib=altsys&page=mylangadmin&dirname='.$target_dirname.'&target_lang='.rawurlencode($target_lang).'&target_file='.rawurlencode($target_file), 1, _MYLANGADMIN_CACHEUPDATED); |
|
272 | 272 | |
273 | 273 | exit; |
274 | 274 | } |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | } else { |
298 | 298 | // X2 core etc. |
299 | 299 | |
300 | - $notice4disp = _MYLANGADMIN_MSG_HOWTOENABLED3LANGMAN4X2 . '<br />'; |
|
300 | + $notice4disp = _MYLANGADMIN_MSG_HOWTOENABLED3LANGMAN4X2.'<br />'; |
|
301 | 301 | |
302 | 302 | $notice4disp .= ' |
303 | 303 | <h4>include/common.php</h4> |
@@ -328,12 +328,12 @@ discard block |
||
328 | 328 | // breadcrumbs |
329 | 329 | $breadcrumbsObj = AltsysBreadcrumbs::getInstance(); |
330 | 330 | if ($breadcrumbsObj->hasPaths()) { |
331 | - $breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=mylangadmin', _MI_ALTSYS_MENU_MYLANGADMIN); |
|
331 | + $breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=mylangadmin', _MI_ALTSYS_MENU_MYLANGADMIN); |
|
332 | 332 | |
333 | 333 | $breadcrumbsObj->appendPath('', $target_mname); |
334 | 334 | } |
335 | 335 | |
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 | $tpl->assign([ |
339 | 339 | 'target_dirname' => $target_dirname, |
@@ -336,24 +336,24 @@ |
||
336 | 336 | require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
337 | 337 | $tpl = new D3Tpl(); |
338 | 338 | $tpl->assign([ |
339 | - 'target_dirname' => $target_dirname, |
|
340 | - 'target_mname' => $target_mname, |
|
341 | - 'target_lang' => $target_lang, |
|
342 | - 'languages' => $languages, |
|
343 | - 'languages4disp' => $languages4disp, |
|
344 | - 'target_file' => $target_file, |
|
345 | - 'lang_files' => $lang_files, |
|
346 | - 'langfile_constants' => $langfile_constants, |
|
347 | - 'mylang_constants' => $mylang_constants, |
|
348 | - 'use_my_language' => mb_strlen($langman->my_language) > 0, |
|
349 | - 'mylang_file_name' => htmlspecialchars($mylang_unique_path, ENT_QUOTES), |
|
350 | - 'cache_file_name' => htmlspecialchars($cache_file_name, ENT_QUOTES), |
|
351 | - 'cache_file_mtime' => (int)$cache_file_mtime, |
|
352 | - 'timezone_offset' => xoops_getUserTimestamp(0), |
|
353 | - 'notice' => $notice4disp, |
|
354 | - 'already_read' => $already_read, |
|
355 | - 'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'altsys'), |
|
356 | - ]); |
|
339 | + 'target_dirname' => $target_dirname, |
|
340 | + 'target_mname' => $target_mname, |
|
341 | + 'target_lang' => $target_lang, |
|
342 | + 'languages' => $languages, |
|
343 | + 'languages4disp' => $languages4disp, |
|
344 | + 'target_file' => $target_file, |
|
345 | + 'lang_files' => $lang_files, |
|
346 | + 'langfile_constants' => $langfile_constants, |
|
347 | + 'mylang_constants' => $mylang_constants, |
|
348 | + 'use_my_language' => mb_strlen($langman->my_language) > 0, |
|
349 | + 'mylang_file_name' => htmlspecialchars($mylang_unique_path, ENT_QUOTES), |
|
350 | + 'cache_file_name' => htmlspecialchars($cache_file_name, ENT_QUOTES), |
|
351 | + 'cache_file_mtime' => (int)$cache_file_mtime, |
|
352 | + 'timezone_offset' => xoops_getUserTimestamp(0), |
|
353 | + 'notice' => $notice4disp, |
|
354 | + 'already_read' => $already_read, |
|
355 | + 'gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'altsys'), |
|
356 | + ]); |
|
357 | 357 | $tpl->display('db:altsys_main_mylangadmin.tpl'); |
358 | 358 | |
359 | 359 | xoops_cp_footer(); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__ . '/include/altsys_functions.php'; |
|
3 | +include_once __DIR__.'/include/altsys_functions.php'; |
|
4 | 4 | |
5 | 5 | // language file (modinfo.php) |
6 | 6 | altsys_include_language_file('modinfo'); |
@@ -109,5 +109,5 @@ discard block |
||
109 | 109 | |
110 | 110 | // keep block's options |
111 | 111 | if (!defined('XOOPS_CUBE_LEGACY') && mb_substr(XOOPS_VERSION, 6, 3) < 2.1 && !empty($_POST['fct']) && !empty($_POST['op']) && 'modulesadmin' == $_POST['fct'] && 'update_ok' == $_POST['op'] && $_POST['dirname'] == $modversion['dirname']) { |
112 | - include __DIR__ . '/include/x20_keepblockoptions.inc.php'; |
|
112 | + include __DIR__.'/include/x20_keepblockoptions.inc.php'; |
|
113 | 113 | } |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | if (!defined('XOOPS_MODULE_PATH')) { |
4 | - define('XOOPS_MODULE_PATH', XOOPS_ROOT_PATH . '/modules'); |
|
4 | + define('XOOPS_MODULE_PATH', XOOPS_ROOT_PATH.'/modules'); |
|
5 | 5 | } |
6 | 6 | if (!defined('XOOPS_MODULE_URL')) { |
7 | - define('XOOPS_MODULE_URL', XOOPS_URL . '/modules'); |
|
7 | + define('XOOPS_MODULE_URL', XOOPS_URL.'/modules'); |
|
8 | 8 | } |
9 | 9 | |
10 | -require_once __DIR__ . '/class/AltsysBreadcrumbs.class.php'; |
|
11 | -require_once __DIR__ . '/include/altsys_functions.php'; |
|
10 | +require_once __DIR__.'/class/AltsysBreadcrumbs.class.php'; |
|
11 | +require_once __DIR__.'/include/altsys_functions.php'; |
|
12 | 12 | |
13 | 13 | if (empty($xoopsModule)) { |
14 | 14 | $moduleperm_handler = xoops_getHandler('module'); |
@@ -16,15 +16,15 @@ discard block |
||
16 | 16 | $xoopsModule = $moduleperm_handler->getByDirname('altsys'); |
17 | 17 | } |
18 | 18 | |
19 | -require XOOPS_ROOT_PATH . '/include/cp_functions.php'; |
|
19 | +require XOOPS_ROOT_PATH.'/include/cp_functions.php'; |
|
20 | 20 | |
21 | 21 | // breadcrumbs |
22 | 22 | $breadcrumbsObj = AltsysBreadcrumbs::getInstance(); |
23 | -$breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php', $GLOBALS['xoopsModule']->getVar('name')); |
|
23 | +$breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php', $GLOBALS['xoopsModule']->getVar('name')); |
|
24 | 24 | |
25 | 25 | // get page |
26 | 26 | $page = preg_replace('/[^a-zA-Z0-9_-]/', '', @$_GET['page']); |
27 | -require __DIR__ . '/controllers.php'; |
|
27 | +require __DIR__.'/controllers.php'; |
|
28 | 28 | if (!in_array($page, $controllers, true)) { |
29 | 29 | $_GET['page'] = $page = 'myblocksadmin'; |
30 | 30 | |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | |
46 | 46 | // branch to each pages |
47 | 47 | $mytrustdirpath = __DIR__; |
48 | -if (file_exists(XOOPS_TRUST_PATH . '/libs/altsys/' . $page . '.php')) { |
|
49 | - include XOOPS_TRUST_PATH . '/libs/altsys/' . $page . '.php'; |
|
48 | +if (file_exists(XOOPS_TRUST_PATH.'/libs/altsys/'.$page.'.php')) { |
|
49 | + include XOOPS_TRUST_PATH.'/libs/altsys/'.$page.'.php'; |
|
50 | 50 | } else { |
51 | 51 | die('wrong request'); |
52 | 52 | } |
@@ -123,12 +123,12 @@ |
||
123 | 123 | |
124 | 124 | // First, check for an overloaded version within the theme folder |
125 | 125 | |
126 | - $filepath = XOOPS_THEME_PATH . "/$theme/modules/$module/$blockpath$tpl_name"; |
|
126 | + $filepath = XOOPS_THEME_PATH."/$theme/modules/$module/$blockpath$tpl_name"; |
|
127 | 127 | |
128 | 128 | if (!file_exists($filepath)) { |
129 | 129 | // If no custom version exists, get the tpl from its default location |
130 | 130 | |
131 | - $filepath = XOOPS_ROOT_PATH . "/modules/$module/templates/$blockpath$tpl_name"; |
|
131 | + $filepath = XOOPS_ROOT_PATH."/modules/$module/templates/$blockpath$tpl_name"; |
|
132 | 132 | |
133 | 133 | if (!file_exists($filepath)) { |
134 | 134 | return $cache[$tpl_name] = $tplobj; |
@@ -6,7 +6,7 @@ discard block |
||
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 | - include_once __DIR__ . '/include/altsys_functions.php'; |
|
9 | + include_once __DIR__.'/include/altsys_functions.php'; |
|
10 | 10 | |
11 | 11 | // language file (modinfo.php) |
12 | 12 | |
@@ -14,4 +14,4 @@ discard block |
||
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'; |
@@ -9,4 +9,4 @@ |
||
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | 10 | $mytrustdirname = 'altsys'; |
11 | 11 | |
12 | -require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/onuninstall.php'; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onuninstall.php'; |
@@ -9,4 +9,4 @@ |
||
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | 10 | $mytrustdirname = 'altsys'; |
11 | 11 | |
12 | -require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/oninstall.php'; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/oninstall.php'; |
@@ -9,4 +9,4 @@ |
||
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | 10 | $mytrustdirname = 'altsys'; |
11 | 11 | |
12 | -require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/onupdate.php'; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/onupdate.php'; |
@@ -9,4 +9,4 @@ |
||
9 | 9 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
10 | 10 | $mytrustdirname = 'altsys'; |
11 | 11 | |
12 | -require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/include/Legacy_AltsysAdminRenderSystem.class.php'; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/include/Legacy_AltsysAdminRenderSystem.class.php'; |