@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -eval(' function xoops_module_update_' . $mydirname . '( $module ) { return altsys_onupdate_base( $module , "' . $mydirname . '" ) ; } '); |
|
3 | +eval(' function xoops_module_update_'.$mydirname.'( $module ) { return altsys_onupdate_base( $module , "'.$mydirname.'" ) ; } '); |
|
4 | 4 | |
5 | 5 | if (!function_exists('altsys_onupdate_base')) { |
6 | 6 | /** |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | if (defined('XOOPS_CUBE_LEGACY')) { |
21 | 21 | $root = XCube_Root::getSingleton(); |
22 | 22 | |
23 | - $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUpdate.' . ucfirst($mydirname) . '.Success', 'altsys_message_append_onupdate'); |
|
23 | + $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUpdate.'.ucfirst($mydirname).'.Success', 'altsys_message_append_onupdate'); |
|
24 | 24 | |
25 | 25 | $msgs = []; |
26 | 26 | } else { |
@@ -37,33 +37,33 @@ discard block |
||
37 | 37 | |
38 | 38 | // configs (Though I know it is not a recommended way...) |
39 | 39 | |
40 | - $check_sql = 'SHOW COLUMNS FROM ' . $db->prefix('config') . " LIKE 'conf_title'"; |
|
40 | + $check_sql = 'SHOW COLUMNS FROM '.$db->prefix('config')." LIKE 'conf_title'"; |
|
41 | 41 | |
42 | 42 | if (($result = $db->query($check_sql)) && ($myrow = $db->fetchArray($result)) && 'varchar(30)' == @$myrow['Type']) { |
43 | - $db->queryF('ALTER TABLE ' . $db->prefix('config') . " MODIFY `conf_title` VARCHAR(255) NOT NULL DEFAULT '', MODIFY `conf_desc` VARCHAR(255) NOT NULL DEFAULT ''"); |
|
43 | + $db->queryF('ALTER TABLE '.$db->prefix('config')." MODIFY `conf_title` VARCHAR(255) NOT NULL DEFAULT '', MODIFY `conf_desc` VARCHAR(255) NOT NULL DEFAULT ''"); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | // 0.4 -> 0.5 |
47 | 47 | |
48 | - $check_sql = 'SELECT COUNT(*) FROM ' . $db->prefix($mydirname . '_language_constants'); |
|
48 | + $check_sql = 'SELECT COUNT(*) FROM '.$db->prefix($mydirname.'_language_constants'); |
|
49 | 49 | |
50 | 50 | if (!$db->query($check_sql)) { |
51 | - $db->queryF('CREATE TABLE ' . $db->prefix($mydirname . '_language_constants') . " (mid SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,language VARCHAR(32) NOT NULL DEFAULT '',name VARCHAR(255) NOT NULL DEFAULT '',value TEXT,PRIMARY KEY (mid,language,name)) ENGINE=MyISAM"); |
|
51 | + $db->queryF('CREATE TABLE '.$db->prefix($mydirname.'_language_constants')." (mid SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,language VARCHAR(32) NOT NULL DEFAULT '',name VARCHAR(255) NOT NULL DEFAULT '',value TEXT,PRIMARY KEY (mid,language,name)) ENGINE=MyISAM"); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | // TEMPLATES (all templates have been already removed by modulesadmin) |
55 | 55 | |
56 | 56 | $tplfile_handler = xoops_getHandler('tplfile'); |
57 | 57 | |
58 | - $tpl_path = __DIR__ . '/templates'; |
|
58 | + $tpl_path = __DIR__.'/templates'; |
|
59 | 59 | |
60 | - if ($handler = @opendir($tpl_path . '/')) { |
|
60 | + if ($handler = @opendir($tpl_path.'/')) { |
|
61 | 61 | while (false !== ($file = readdir($handler))) { |
62 | 62 | if ('.' == mb_substr($file, 0, 1)) { |
63 | 63 | continue; |
64 | 64 | } |
65 | 65 | |
66 | - $file_path = $tpl_path . '/' . $file; |
|
66 | + $file_path = $tpl_path.'/'.$file; |
|
67 | 67 | |
68 | 68 | if (is_file($file_path)) { |
69 | 69 | $mtime = (int)(@filemtime($file_path)); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $tplfile->setVar('tpl_tplset', 'default'); |
78 | 78 | |
79 | - $tplfile->setVar('tpl_file', $mydirname . '_' . $file); |
|
79 | + $tplfile->setVar('tpl_file', $mydirname.'_'.$file); |
|
80 | 80 | |
81 | 81 | $tplfile->setVar('tpl_desc', '', true); |
82 | 82 | |
@@ -89,15 +89,15 @@ discard block |
||
89 | 89 | $tplfile->setVar('tpl_type', 'module'); |
90 | 90 | |
91 | 91 | if (!$tplfile_handler->insert($tplfile)) { |
92 | - $msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> to the database.</span>'; |
|
92 | + $msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> to the database.</span>'; |
|
93 | 93 | } else { |
94 | 94 | $tplid = $tplfile->getVar('tpl_id'); |
95 | 95 | |
96 | - $msgs[] = 'Template <b>' . htmlspecialchars($mydirname . '_' . $file, ENT_QUOTES | ENT_HTML5) . '</b> added to the database. (ID: <b>' . $tplid . '</b>)'; |
|
96 | + $msgs[] = 'Template <b>'.htmlspecialchars($mydirname.'_'.$file, ENT_QUOTES | ENT_HTML5).'</b> added to the database. (ID: <b>'.$tplid.'</b>)'; |
|
97 | 97 | |
98 | 98 | // generate compiled file |
99 | 99 | |
100 | - require_once XOOPS_TRUST_PATH . '/libs/altsys/include/altsys_functions.php'; |
|
100 | + require_once XOOPS_TRUST_PATH.'/libs/altsys/include/altsys_functions.php'; |
|
101 | 101 | |
102 | 102 | altsys_clear_templates_c(); |
103 | 103 | |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | closedir($handler); |
115 | 115 | } |
116 | 116 | |
117 | - include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
117 | + include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
118 | 118 | |
119 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
119 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
120 | 120 | |
121 | 121 | xoops_template_clear_module_cache($mid); |
122 | 122 |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | |
8 | 8 | error_reporting(0); |
9 | 9 | |
10 | -include_once __DIR__ . '/include/gtickets.php'; |
|
11 | -include_once __DIR__ . '/include/altsys_functions.php'; |
|
10 | +include_once __DIR__.'/include/gtickets.php'; |
|
11 | +include_once __DIR__.'/include/altsys_functions.php'; |
|
12 | 12 | |
13 | 13 | // this page can be called only from altsys |
14 | 14 | if ('altsys' != $xoopsModule->getVar('dirname')) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | continue; |
45 | 45 | } |
46 | 46 | |
47 | - convert_array2info_recursive($var_name . '.' . $key, $val, $sum_array_name); |
|
47 | + convert_array2info_recursive($var_name.'.'.$key, $val, $sum_array_name); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | { |
82 | 82 | global $site_name; |
83 | 83 | |
84 | - return '<macromedia-extension name="XOOPS-' . $site_name . ' ' . $mxi_name . '" version="1.0" type="Suite" requires-restart="true"> |
|
84 | + return '<macromedia-extension name="XOOPS-'.$site_name.' '.$mxi_name.'" version="1.0" type="Suite" requires-restart="true"> |
|
85 | 85 | <products> |
86 | 86 | <product name="Dreamweaver" version="6" primary="true" /> |
87 | 87 | </products> |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | ]]></license-agreement> |
97 | 97 | <description><![CDATA[ |
98 | 98 | |
99 | -Usable template variables in ' . $mxi_name . ' |
|
99 | +Usable template variables in ' . $mxi_name.' |
|
100 | 100 | |
101 | 101 | ]]></description> |
102 | 102 | <ui-access><![CDATA[ |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | ]]></ui-access> |
109 | 109 | <files> |
110 | -' . $file_entries . ' |
|
110 | +' . $file_entries.' |
|
111 | 111 | </files> |
112 | 112 | <configuration-changes> |
113 | 113 | </configuration-changes> |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $tplsvarsinfo_mod_tpl = []; |
122 | 122 | $tplsvarsinfo_total = []; |
123 | 123 | |
124 | -if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) { |
|
124 | +if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) { |
|
125 | 125 | while (false !== ($file = readdir($handler))) { |
126 | 126 | // skip files other than tplsvars_* files |
127 | 127 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | continue; |
138 | 138 | } |
139 | 139 | |
140 | - $file_path = XOOPS_COMPILE_PATH . '/' . $file; |
|
140 | + $file_path = XOOPS_COMPILE_PATH.'/'.$file; |
|
141 | 141 | |
142 | 142 | $file_body = implode('', file($file_path)); |
143 | 143 | |
@@ -183,13 +183,13 @@ discard block |
||
183 | 183 | </snippet>'; |
184 | 184 | |
185 | 185 | if (!empty($_POST['as_dw_extension_zip'])) { |
186 | - require_once XOOPS_ROOT_PATH . '/class/zipdownloader.php'; |
|
186 | + require_once XOOPS_ROOT_PATH.'/class/zipdownloader.php'; |
|
187 | 187 | |
188 | 188 | $downloader = new XoopsZipDownloader(); |
189 | 189 | |
190 | 190 | $do_download = true; |
191 | 191 | } elseif (!empty($_POST['as_dw_extension_tgz'])) { |
192 | - require_once XOOPS_ROOT_PATH . '/class/tardownloader.php'; |
|
192 | + require_once XOOPS_ROOT_PATH.'/class/tardownloader.php'; |
|
193 | 193 | |
194 | 194 | $downloader = new XoopsTarDownloader(); |
195 | 195 | |
@@ -222,9 +222,9 @@ discard block |
||
222 | 222 | |
223 | 223 | $snippet_body = sprintf($snippet_format, $name, $description); |
224 | 224 | |
225 | - $file_name = strtr($key, '.', '_') . '.csn'; |
|
225 | + $file_name = strtr($key, '.', '_').'.csn'; |
|
226 | 226 | |
227 | - $downloader->addFileData($snippet_body, $dw_snippets_dirname . '/' . $file_name); |
|
227 | + $downloader->addFileData($snippet_body, $dw_snippets_dirname.'/'.$file_name); |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | // make a mxi file per module |
@@ -236,15 +236,15 @@ discard block |
||
236 | 236 | foreach ($tplsvarsinfo as $key => $val) { |
237 | 237 | $name = mb_substr($key, 1); |
238 | 238 | |
239 | - $file_name = strtr($key, '.', '_') . '.csn'; |
|
239 | + $file_name = strtr($key, '.', '_').'.csn'; |
|
240 | 240 | |
241 | - $file_entries .= "\t\t" . '<file name="' . $dw_snippets_dirname . '/' . $file_name . '" destination="$Dreamweaver/Configuration/Snippets/XOOPS-' . $site_name . '/' . $tpl_name . '" />' . "\n"; |
|
241 | + $file_entries .= "\t\t".'<file name="'.$dw_snippets_dirname.'/'.$file_name.'" destination="$Dreamweaver/Configuration/Snippets/XOOPS-'.$site_name.'/'.$tpl_name.'" />'."\n"; |
|
242 | 242 | } |
243 | 243 | } |
244 | 244 | |
245 | 245 | $mxi_body = get_mxi_body($mod_name, $file_entries); |
246 | 246 | |
247 | - $downloader->addFileData($mxi_body, $mod_name . '.mxi'); |
|
247 | + $downloader->addFileData($mxi_body, $mod_name.'.mxi'); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | //bugfix by nao-pon ,echo is not necessary for downloader |
@@ -5,9 +5,9 @@ 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'; |
|
8 | +require_once __DIR__.'/class/AltsysBreadcrumbs.class.php'; |
|
9 | +include_once __DIR__.'/include/gtickets.php'; |
|
10 | +include_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 |
||
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&lib=altsys&page=mytplsform&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&lib=altsys&page=mytplsform&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 |
||
41 | 41 | ], |
42 | 42 | |
43 | 43 | 'hooksavevars' => [ |
44 | - 'pre' => '<?php include_once "' . XOOPS_TRUST_PATH . '/libs/altsys/include/compilehook.inc.php" ; tplsadmin_save_tplsvars(\'%s\',$this) ; ?>', |
|
44 | + 'pre' => '<?php include_once "'.XOOPS_TRUST_PATH.'/libs/altsys/include/compilehook.inc.php" ; tplsadmin_save_tplsvars(\'%s\',$this) ; ?>', |
|
45 | 45 | 'post' => '', |
46 | 46 | 'success_msg' => _TPLSADMIN_FMT_MSG_HOOKSAVEVARS, |
47 | 47 | 'dt' => _TPLSADMIN_DT_HOOKSAVEVARS, |
@@ -70,12 +70,12 @@ discard block |
||
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 | - if (! empty($_POST['clearcache'])) { |
|
78 | + if (!empty($_POST['clearcache'])) { |
|
79 | 79 | // judging template cache '*.php' |
80 | 80 | |
81 | 81 | if ('.php' !== mb_substr($file, -4)) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | } |
90 | 90 | } |
91 | 91 | |
92 | - $file_path = XOOPS_COMPILE_PATH . '/' . $file; |
|
92 | + $file_path = XOOPS_COMPILE_PATH.'/'.$file; |
|
93 | 93 | |
94 | 94 | @unlink($file_path); |
95 | 95 | } |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | // Ticket Check |
109 | 109 | |
110 | 110 | if (!$xoopsGTicket->check()) { |
111 | - redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors()); |
|
111 | + redirect_header(XOOPS_URL.'/', 3, $xoopsGTicket->getErrors()); |
|
112 | 112 | } |
113 | 113 | |
114 | - if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) { |
|
114 | + if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) { |
|
115 | 115 | $file_count = 0; |
116 | 116 | |
117 | 117 | while (false !== ($file = readdir($handler))) { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $skip_mode = false; |
136 | 136 | } |
137 | 137 | |
138 | - $file_path = XOOPS_COMPILE_PATH . '/' . $file; |
|
138 | + $file_path = XOOPS_COMPILE_PATH.'/'.$file; |
|
139 | 139 | |
140 | 140 | $file_bodies = file($file_path); |
141 | 141 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | // insert "pre" command before the compiled cache |
165 | 165 | |
166 | 166 | if ($compile_hook['pre'] && !$skip_mode) { |
167 | - fwrite($fw, sprintf($compile_hook['pre'], htmlspecialchars($tpl_name, ENT_QUOTES)) . "\r\n"); |
|
167 | + fwrite($fw, sprintf($compile_hook['pre'], htmlspecialchars($tpl_name, ENT_QUOTES))."\r\n"); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | // rest of template cache |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | // insert "post" command after the compiled cache |
177 | 177 | |
178 | 178 | if ($compile_hook['post'] && !$skip_mode) { |
179 | - fwrite($fw, "\r\n" . sprintf($compile_hook['post'], htmlspecialchars($tpl_name, ENT_QUOTES))); |
|
179 | + fwrite($fw, "\r\n".sprintf($compile_hook['post'], htmlspecialchars($tpl_name, ENT_QUOTES))); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | fclose($fw); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | // count template vars & compiled caches |
207 | 207 | $compiledcache_num = 0; |
208 | 208 | $tplsvars_num = 0; |
209 | -if ($handler = opendir(XOOPS_COMPILE_PATH . '/')) { |
|
209 | +if ($handler = opendir(XOOPS_COMPILE_PATH.'/')) { |
|
210 | 210 | while (false !== ($file = readdir($handler))) { |
211 | 211 | if (0 === strncmp($file, 'tplsvars_', 9)) { |
212 | 212 | $tplsvars_num++; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | } |
218 | 218 | |
219 | 219 | // get tplsets |
220 | -$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 ORDER BY tpl_tplset='default' DESC,tpl_tplset"; |
|
220 | +$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 ORDER BY tpl_tplset='default' DESC,tpl_tplset"; |
|
221 | 221 | $srs = $xoopsDB->query($sql); |
222 | 222 | $tplset_options = "<option value=''>----</option>\n"; |
223 | 223 | while (list($tplset, $tpl_count) = $xoopsDB->fetchRow($srs)) { |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | |
238 | 238 | // breadcrumbs |
239 | 239 | $breadcrumbsObj = AltsysBreadcrumbs::getInstance(); |
240 | -$breadcrumbsObj->appendPath(XOOPS_URL . '/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=compilehookadmin', _MI_ALTSYS_MENU_COMPILEHOOKADMIN); |
|
240 | +$breadcrumbsObj->appendPath(XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=compilehookadmin', _MI_ALTSYS_MENU_COMPILEHOOKADMIN); |
|
241 | 241 | |
242 | 242 | echo " |
243 | 243 | <style> |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | <dl> |
256 | 256 | <dt> |
257 | 257 | {$compile_hook['dt']} |
258 | - <input type='submit' name='$command' id='$command' value='" . _GO . "' onclick='return confirm(\"{$compile_hook['conf_msg']}\");' /> |
|
258 | + <input type='submit' name='$command' id='$command' value='"._GO."' onclick='return confirm(\"{$compile_hook['conf_msg']}\");' /> |
|
259 | 259 | </dt> |
260 | 260 | <dd> |
261 | 261 | {$compile_hook['dd']} |
@@ -267,26 +267,26 @@ discard block |
||
267 | 267 | |
268 | 268 | echo " |
269 | 269 | <p style='margin:10px;'> |
270 | - " . _TPLSADMIN_NUMCAP_COMPILEDCACHES . ": <strong>$compiledcache_num</strong> |
|
271 | - <input type='submit' name='clearcache' value='" . _DELETE . "' onclick='return confirm(\"" . _TPLSADMIN_CNF_DELETEOK . "\");' /> |
|
270 | + " . _TPLSADMIN_NUMCAP_COMPILEDCACHES.": <strong>$compiledcache_num</strong> |
|
271 | + <input type='submit' name='clearcache' value='"._DELETE."' onclick='return confirm(\""._TPLSADMIN_CNF_DELETEOK."\");' /> |
|
272 | 272 | |
273 | 273 | </p> |
274 | 274 | <p style='margin:10px;'> |
275 | - " . _TPLSADMIN_NUMCAP_TPLSVARS . ": <strong>$tplsvars_num</strong> |
|
276 | - <input type='submit' name='cleartplsvars' value='" . _DELETE . "' onclick='return confirm(\"" . _TPLSADMIN_CNF_DELETEOK . "\");' /> |
|
275 | + " . _TPLSADMIN_NUMCAP_TPLSVARS.": <strong>$tplsvars_num</strong> |
|
276 | + <input type='submit' name='cleartplsvars' value='"._DELETE."' onclick='return confirm(\""._TPLSADMIN_CNF_DELETEOK."\");' /> |
|
277 | 277 | |
278 | 278 | </p> |
279 | - " . $xoopsGTicket->getTicketHtml(__LINE__) . " |
|
279 | + " . $xoopsGTicket->getTicketHtml(__LINE__)." |
|
280 | 280 | </form> |
281 | 281 | |
282 | 282 | <form action='?mode=admin&lib=altsys&page=get_tplsvarsinfo' method='post' class='odd' style='margin: 40px;' target='_blank'> |
283 | 283 | <p> |
284 | 284 | <dl> |
285 | 285 | <dt> |
286 | - " . _TPLSADMIN_DT_GETTPLSVARSINFO_DW . ' |
|
286 | + " . _TPLSADMIN_DT_GETTPLSVARSINFO_DW.' |
|
287 | 287 | </dt> |
288 | 288 | <dd> |
289 | - ' . _TPLSADMIN_DD_GETTPLSVARSINFO_DW . " |
|
289 | + ' . _TPLSADMIN_DD_GETTPLSVARSINFO_DW." |
|
290 | 290 | <br /> |
291 | 291 | <input type='submit' name='as_dw_extension_zip' value='zip' /> |
292 | 292 | <input type='submit' name='as_dw_extension_tgz' value='tar.gz' /> |
@@ -299,10 +299,10 @@ discard block |
||
299 | 299 | <p> |
300 | 300 | <dl> |
301 | 301 | <dt> |
302 | - " . _TPLSADMIN_DT_GETTEMPLATES . ' |
|
302 | + " . _TPLSADMIN_DT_GETTEMPLATES.' |
|
303 | 303 | </dt> |
304 | 304 | <dd> |
305 | - ' . _TPLSADMIN_DD_GETTEMPLATES . " |
|
305 | + ' . _TPLSADMIN_DD_GETTEMPLATES." |
|
306 | 306 | <br /> |
307 | 307 | <select name='tplset'>$tplset_options</select> |
308 | 308 | <input type='submit' name='download_zip' value='zip' /> |
@@ -316,14 +316,14 @@ discard block |
||
316 | 316 | <p> |
317 | 317 | <dl> |
318 | 318 | <dt> |
319 | - " . _TPLSADMIN_DT_PUTTEMPLATES . ' |
|
319 | + "._TPLSADMIN_DT_PUTTEMPLATES.' |
|
320 | 320 | </dt> |
321 | 321 | <dd> |
322 | - ' . _TPLSADMIN_DD_PUTTEMPLATES . " |
|
322 | + ' . _TPLSADMIN_DD_PUTTEMPLATES." |
|
323 | 323 | <br /> |
324 | 324 | <select name='tplset'>$tplset_options</select> |
325 | 325 | <input type='file' name='tplset_archive' size='60' /> |
326 | - <input type='submit' value='" . _SUBMIT . "' /> |
|
326 | + <input type='submit' value='"._SUBMIT."' /> |
|
327 | 327 | </dd> |
328 | 328 | </dl> |
329 | 329 | </p> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | $db = XoopsDatabaseFactory::getDatabaseConnection(); |
10 | 10 | |
11 | 11 | // get custom templates |
12 | -list($count) = $db->fetchRow($db->query('SELECT COUNT(t.tpl_module) AS tpl_count FROM ' . $db->prefix('tplfile') . " t WHERE t.tpl_type='custom'")); |
|
12 | +list($count) = $db->fetchRow($db->query('SELECT COUNT(t.tpl_module) AS tpl_count FROM '.$db->prefix('tplfile')." t WHERE t.tpl_type='custom'")); |
|
13 | 13 | if ('_custom' == $current_dirname) { |
14 | 14 | // $GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => _MYTPLSADMIN_CUSTOMTEMPLATE ) ; |
15 | 15 | |
@@ -21,35 +21,35 @@ discard block |
||
21 | 21 | $adminmenu = [ |
22 | 22 | [ |
23 | 23 | 'selected' => $custom_selected, |
24 | - 'title' => _MYTPLSADMIN_CUSTOMTEMPLATE . " ($count)", |
|
24 | + 'title' => _MYTPLSADMIN_CUSTOMTEMPLATE." ($count)", |
|
25 | 25 | 'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname=_custom', |
26 | 26 | ], |
27 | 27 | ]; |
28 | 28 | |
29 | 29 | // get modules/templates |
30 | -$mrs = $db->query('SELECT m.name,m.dirname,COUNT(t.tpl_module) AS tpl_count FROM ' . $db->prefix('modules') . ' m LEFT JOIN ' . $db->prefix('tplfile') . ' t ON m.dirname=t.tpl_module WHERE m.isactive GROUP BY m.mid HAVING tpl_count>0 ORDER BY m.weight,m.mid'); |
|
30 | +$mrs = $db->query('SELECT m.name,m.dirname,COUNT(t.tpl_module) AS tpl_count FROM '.$db->prefix('modules').' m LEFT JOIN '.$db->prefix('tplfile').' t ON m.dirname=t.tpl_module WHERE m.isactive GROUP BY m.mid HAVING tpl_count>0 ORDER BY m.weight,m.mid'); |
|
31 | 31 | |
32 | 32 | // module loop |
33 | 33 | while (list($name, $dirname, $count) = $db->fetchRow($mrs)) { |
34 | 34 | if ($dirname == $current_dirname) { |
35 | 35 | $adminmenu[] = [ |
36 | 36 | 'selected' => true, |
37 | - 'title' => $name . " ($count)", |
|
38 | - 'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $dirname, |
|
37 | + 'title' => $name." ($count)", |
|
38 | + 'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$dirname, |
|
39 | 39 | ]; |
40 | 40 | |
41 | 41 | //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => htmlspecialchars( $name , ENT_QUOTES ) ) ; |
42 | 42 | } else { |
43 | 43 | $adminmenu[] = [ |
44 | 44 | 'selected' => false, |
45 | - 'title' => $name . " ($count)", |
|
46 | - 'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname=' . $dirname, |
|
45 | + 'title' => $name." ($count)", |
|
46 | + 'link' => '?mode=admin&lib=altsys&page=mytplsadmin&dirname='.$dirname, |
|
47 | 47 | ]; |
48 | 48 | } |
49 | 49 | } |
50 | 50 | |
51 | 51 | // display |
52 | -require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
|
52 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
53 | 53 | $tpl = new D3Tpl(); |
54 | 54 | $tpl->assign([ |
55 | 55 | 'adminmenu' => $adminmenu, |
@@ -52,7 +52,7 @@ |
||
52 | 52 | require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
53 | 53 | $tpl = new D3Tpl(); |
54 | 54 | $tpl->assign([ |
55 | - 'adminmenu' => $adminmenu, |
|
56 | - 'mypage' => 'mytplsadmin', |
|
57 | - ]); |
|
55 | + 'adminmenu' => $adminmenu, |
|
56 | + 'mypage' => 'mytplsadmin', |
|
57 | + ]); |
|
58 | 58 | $tpl->display('db:altsys_inc_mymenusub.tpl'); |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | // get block info |
28 | 28 | |
29 | 29 | if (ALTSYS_CORE_TYPE_X22 != $core_type) { |
30 | - list($block_count_all) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $m4menu->getVar('mid'))); |
|
30 | + list($block_count_all) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('newblocks').' WHERE mid='.$m4menu->getVar('mid'))); |
|
31 | 31 | |
32 | - list($block_count_visible) = $db->fetchRow($db->query('SELECT COUNT(*) FROM ' . $db->prefix('newblocks') . ' WHERE mid=' . $m4menu->getVar('mid') . ' AND visible>0')); |
|
32 | + list($block_count_visible) = $db->fetchRow($db->query('SELECT COUNT(*) FROM '.$db->prefix('newblocks').' WHERE mid='.$m4menu->getVar('mid').' AND visible>0')); |
|
33 | 33 | |
34 | 34 | // $block_desc = " $block_count_all($block_count_visible)" ; |
35 | 35 | |
@@ -41,22 +41,22 @@ discard block |
||
41 | 41 | if ($m4menu->getVar('dirname') == $current_dirname) { |
42 | 42 | $adminmenu[] = [ |
43 | 43 | 'selected' => true, |
44 | - 'title' => $m4menu->getVar('name', 'n') . $block_desc, |
|
45 | - 'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname=' . $m4menu->getVar('dirname', 'n'), |
|
44 | + 'title' => $m4menu->getVar('name', 'n').$block_desc, |
|
45 | + 'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$m4menu->getVar('dirname', 'n'), |
|
46 | 46 | ]; |
47 | 47 | |
48 | 48 | //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => $m4menu->getVar('name') ) ; |
49 | 49 | } else { |
50 | 50 | $adminmenu[] = [ |
51 | 51 | 'selected' => false, |
52 | - 'title' => $m4menu->getVar('name', 'n') . $block_desc, |
|
53 | - 'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname=' . $m4menu->getVar('dirname', 'n'), |
|
52 | + 'title' => $m4menu->getVar('name', 'n').$block_desc, |
|
53 | + 'link' => '?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$m4menu->getVar('dirname', 'n'), |
|
54 | 54 | ]; |
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | 58 | // display |
59 | -require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
|
59 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
60 | 60 | $tpl = new D3Tpl(); |
61 | 61 | $tpl->assign([ |
62 | 62 | 'adminmenu' => $adminmenu, |
@@ -59,7 +59,7 @@ |
||
59 | 59 | require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
60 | 60 | $tpl = new D3Tpl(); |
61 | 61 | $tpl->assign([ |
62 | - 'adminmenu' => $adminmenu, |
|
63 | - 'mypage' => 'myblocksadmin', |
|
64 | - ]); |
|
62 | + 'adminmenu' => $adminmenu, |
|
63 | + 'mypage' => 'myblocksadmin', |
|
64 | + ]); |
|
65 | 65 | $tpl->display('db:altsys_inc_mymenusub.tpl'); |
@@ -7,29 +7,29 @@ |
||
7 | 7 | $current_dirname = preg_replace('/[^0-9a-zA-Z_-]/', '', @$_GET['dirname']); |
8 | 8 | |
9 | 9 | $db = XoopsDatabaseFactory::getDatabaseConnection(); |
10 | -$mrs = $db->query('SELECT m.name,m.dirname,COUNT(l.mid) FROM ' . $db->prefix('modules') . ' m LEFT JOIN ' . $db->prefix('altsys_language_constants') . ' l ON m.mid=l.mid WHERE m.isactive GROUP BY m.mid ORDER BY m.weight,m.mid'); |
|
10 | +$mrs = $db->query('SELECT m.name,m.dirname,COUNT(l.mid) FROM '.$db->prefix('modules').' m LEFT JOIN '.$db->prefix('altsys_language_constants').' l ON m.mid=l.mid WHERE m.isactive GROUP BY m.mid ORDER BY m.weight,m.mid'); |
|
11 | 11 | |
12 | 12 | $adminmenu = []; |
13 | 13 | while (list($name, $dirname, $count) = $db->fetchRow($mrs)) { |
14 | 14 | if ($dirname == $current_dirname) { |
15 | 15 | $adminmenu[] = [ |
16 | 16 | 'selected' => true, |
17 | - 'title' => $name . " ($count)", |
|
18 | - 'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname=' . $dirname, |
|
17 | + 'title' => $name." ($count)", |
|
18 | + 'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname='.$dirname, |
|
19 | 19 | ]; |
20 | 20 | |
21 | 21 | //$GLOBALS['altsysXoopsBreadcrumbs'][] = array( 'name' => htmlspecialchars( $name , ENT_QUOTES ) ) ; |
22 | 22 | } else { |
23 | 23 | $adminmenu[] = [ |
24 | 24 | 'selected' => false, |
25 | - 'title' => $name . " ($count)", |
|
26 | - 'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname=' . $dirname, |
|
25 | + 'title' => $name." ($count)", |
|
26 | + 'link' => '?mode=admin&lib=altsys&page=mylangadmin&dirname='.$dirname, |
|
27 | 27 | ]; |
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | 31 | // display |
32 | -require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
|
32 | +require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php'; |
|
33 | 33 | $tpl = new D3Tpl(); |
34 | 34 | $tpl->assign([ |
35 | 35 | 'adminmenu' => $adminmenu, |
@@ -32,7 +32,7 @@ |
||
32 | 32 | require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; |
33 | 33 | $tpl = new D3Tpl(); |
34 | 34 | $tpl->assign([ |
35 | - 'adminmenu' => $adminmenu, |
|
36 | - 'mypage' => 'mylangadmin', |
|
37 | - ]); |
|
35 | + 'adminmenu' => $adminmenu, |
|
36 | + 'mypage' => 'mylangadmin', |
|
37 | + ]); |
|
38 | 38 | $tpl->display('db:altsys_inc_mymenusub.tpl'); |
@@ -4,10 +4,10 @@ |
||
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 | - include_once __DIR__ . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/modinfo.php'; |
|
9 | -} elseif (file_exists(__DIR__ . '/language/english/modinfo.php')) { |
|
10 | - include_once __DIR__ . '/language/english/modinfo.php'; |
|
7 | +if (file_exists(__DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php')) { |
|
8 | + include_once __DIR__.'/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php'; |
|
9 | +} elseif (file_exists(__DIR__.'/language/english/modinfo.php')) { |
|
10 | + include_once __DIR__.'/language/english/modinfo.php'; |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | $controllers = [ |
@@ -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 | } |