@@ -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 . '/blocks.php'; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/blocks.php'; |
@@ -3,9 +3,9 @@ discard block |
||
3 | 3 | $xoopsOption['nocommon'] = 1; |
4 | 4 | define('_LEGACY_PREVENT_LOAD_CORE_', 1); |
5 | 5 | |
6 | -require_once \dirname(__DIR__, 2) . '/mainfile.php'; |
|
6 | +require_once \dirname(__DIR__, 2).'/mainfile.php'; |
|
7 | 7 | |
8 | -if (defined('XOOPS_TRUST_PATH') && XOOPS_TRUST_PATH !== '' && file_exists(XOOPS_TRUST_PATH . '/libs/altsys')) { |
|
8 | +if (defined('XOOPS_TRUST_PATH') && XOOPS_TRUST_PATH !== '' && file_exists(XOOPS_TRUST_PATH.'/libs/altsys')) { |
|
9 | 9 | exit('No problem with your XOOPS_TRUST_PATH'); |
10 | 10 | } |
11 | 11 | |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | if ('.' == mb_substr($file, 0, 1)) { |
23 | 23 | continue; |
24 | 24 | } |
25 | - $fullpath = $baseDir . '/' . $file; |
|
25 | + $fullpath = $baseDir.'/'.$file; |
|
26 | 26 | if (!is_dir($fullpath)) { |
27 | 27 | continue; |
28 | 28 | } |
29 | - if (is_dir($fullpath . '/libs/altsys')) { |
|
29 | + if (is_dir($fullpath.'/libs/altsys')) { |
|
30 | 30 | $xoops_trust_path = $fullpath; |
31 | 31 | break 2; |
32 | 32 | } |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | } |
36 | 36 | // fall back |
37 | 37 | if (empty($xoops_trust_path)) { |
38 | - $xoops_trust_path = dirname(XOOPS_ROOT_PATH) . '/xoops_trust_path'; |
|
38 | + $xoops_trust_path = dirname(XOOPS_ROOT_PATH).'/xoops_trust_path'; |
|
39 | 39 | } |
40 | 40 | // create the hint |
41 | 41 | if (!defined('XOOPS_TRUST_PATH')) { |
42 | - $hint = "Insert the red line.<br>define('XOOPS_ROOT_PATH', '" . htmlspecialchars(XOOPS_ROOT_PATH, ENT_QUOTES) . "');<br><ins style='color:red;'>define('XOOPS_TRUST_PATH', '" . htmlspecialchars($xoops_trust_path, ENT_QUOTES) . "');</ins>"; |
|
42 | + $hint = "Insert the red line.<br>define('XOOPS_ROOT_PATH', '".htmlspecialchars(XOOPS_ROOT_PATH, ENT_QUOTES)."');<br><ins style='color:red;'>define('XOOPS_TRUST_PATH', '".htmlspecialchars($xoops_trust_path, ENT_QUOTES)."');</ins>"; |
|
43 | 43 | } else { |
44 | - $hint = "<del>define('XOOPS_TRUST_PATH', '');</del><br><ins style='color:red;'>define('XOOPS_TRUST_PATH', '" . htmlspecialchars($xoops_trust_path, ENT_QUOTES) . "');</ins>"; |
|
44 | + $hint = "<del>define('XOOPS_TRUST_PATH', '');</del><br><ins style='color:red;'>define('XOOPS_TRUST_PATH', '".htmlspecialchars($xoops_trust_path, ENT_QUOTES)."');</ins>"; |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <input type="submit" value="next"> |
61 | 61 | </form> |
62 | 62 | <?php if ($hint) { |
63 | - echo 'Edit mainfile.php like this: <blockquote style="border: black solid 1px;">' . $hint . '</blockquote>'; |
|
63 | + echo 'Edit mainfile.php like this: <blockquote style="border: black solid 1px;">'.$hint.'</blockquote>'; |
|
64 | 64 | } ?> |
65 | 65 | </body> |
66 | 66 | </html> |
@@ -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 . '/admin_menu.php'; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/admin_menu.php'; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require dirname(__DIR__, 3) . '/mainfile.php'; |
|
3 | +require dirname(__DIR__, 3).'/mainfile.php'; |
|
4 | 4 | if (!defined('XOOPS_TRUST_PATH')) { |
5 | 5 | exit('set XOOPS_TRUST_PATH in mainfile.php'); |
6 | 6 | } |
@@ -10,4 +10,4 @@ discard block |
||
10 | 10 | // require $mydirpath.'/mytrustdirname.php' ; // set $mytrustdirname |
11 | 11 | $mytrustdirname = 'altsys'; |
12 | 12 | |
13 | -require XOOPS_TRUST_PATH . '/libs/' . $mytrustdirname . '/index.php'; |
|
13 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/index.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 . '/preload.php'; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/preload.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 . '/xoops_version.php'; |
|
12 | +require XOOPS_TRUST_PATH.'/libs/'.$mytrustdirname.'/xoops_version.php'; |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | $xoopsOption['nocommon'] = 1; |
4 | 4 | define('_LEGACY_PREVENT_LOAD_CORE_', true); |
5 | -require_once \dirname(__DIR__, 2) . '/mainfile.php'; |
|
5 | +require_once \dirname(__DIR__, 2).'/mainfile.php'; |
|
6 | 6 | |
7 | -header('Location: ' . XOOPS_URL . '/user.php'); |
|
7 | +header('Location: '.XOOPS_URL.'/user.php'); |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | |
18 | 18 | // This is a mimic file from header.php of 2.0.16-JP |
19 | 19 | |
20 | -require_once dirname(__DIR__) . '/class/AltsysBreadcrumbs.class.php'; |
|
21 | -include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
20 | +require_once dirname(__DIR__).'/class/AltsysBreadcrumbs.class.php'; |
|
21 | +include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
22 | 22 | |
23 | 23 | $xoopsOption['theme_use_smarty'] = 1; |
24 | 24 | // include Smarty template engine and initialize it |
25 | -require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
25 | +require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
26 | 26 | $xoopsTpl = new XoopsTpl(); |
27 | 27 | $xoopsTpl->xoops_setCaching(2); |
28 | 28 | if (3 == $xoopsConfig['debug_mode']) { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | } |
31 | 31 | $xoopsTpl->assign([ |
32 | 32 | 'xoops_theme' => $xoopsConfig['theme_set'], |
33 | - 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoopsConfig['theme_set'] . '/', |
|
33 | + 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$xoopsConfig['theme_set'].'/', |
|
34 | 34 | 'xoops_themecss' => xoops_getcss($xoopsConfig['theme_set']), |
35 | 35 | 'xoops_requesturi' => htmlspecialchars($GLOBALS['xoopsRequestUri'], ENT_QUOTES), |
36 | 36 | 'xoops_sitename' => htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES), |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | foreach (array_keys($config) as $i) { |
45 | 45 | // prefix each tag with 'xoops_' |
46 | 46 | |
47 | - $xoopsTpl->assign('xoops_' . $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
|
47 | + $xoopsTpl->assign('xoops_'.$config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
|
48 | 48 | } |
49 | 49 | //unset($config); |
50 | 50 | // Weird, but need extra <script> tags for 2.0.x themes |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | if ($breadcrumbsObj->hasPaths()) { |
86 | 86 | $xoops_breadcrumbs = $breadcrumbsObj->getXoopsBreadcrumbs(); |
87 | 87 | } else { |
88 | - $mod_url = XOOPS_URL . '/modules/' . $target_module->getVar('dirname'); |
|
88 | + $mod_url = XOOPS_URL.'/modules/'.$target_module->getVar('dirname'); |
|
89 | 89 | |
90 | - $mod_path = XOOPS_ROOT_PATH . '/modules/' . $target_module->getVar('dirname'); |
|
90 | + $mod_path = XOOPS_ROOT_PATH.'/modules/'.$target_module->getVar('dirname'); |
|
91 | 91 | |
92 | 92 | $modinfo = &$target_module->getInfo(); |
93 | 93 | |
@@ -95,14 +95,14 @@ discard block |
||
95 | 95 | |
96 | 96 | if (!empty($modinfo['hasMain'])) { |
97 | 97 | $xoops_breadcrumbs[] = [ |
98 | - 'url' => $mod_url . '/', |
|
98 | + 'url' => $mod_url.'/', |
|
99 | 99 | 'name' => sprintf(_MD_A_AINTHEME_FMT_PUBLICTOP, $target_module->getVar('name')), |
100 | 100 | ]; |
101 | 101 | } |
102 | 102 | |
103 | 103 | if (!empty($modinfo['adminindex'])) { |
104 | 104 | $xoops_breadcrumbs[] = [ |
105 | - 'url' => $mod_url . '/' . $modinfo['adminindex'], |
|
105 | + 'url' => $mod_url.'/'.$modinfo['adminindex'], |
|
106 | 106 | 'name' => sprintf(_MD_A_AINTHEME_FMT_ADMINTOP, $target_module->getVar('name')), |
107 | 107 | ]; |
108 | 108 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | if (!empty($GLOBALS['altsysAdminPageTitle'])) { |
111 | 111 | $xoops_breadcrumbs[] = ['name' => htmlspecialchars($GLOBALS['altsysAdminPageTitle'], ENT_QUOTES)]; |
112 | 112 | } elseif (!empty($modinfo['adminmenu'])) { |
113 | - @include $mod_path . '/' . $modinfo['adminmenu']; |
|
113 | + @include $mod_path.'/'.$modinfo['adminmenu']; |
|
114 | 114 | |
115 | 115 | if (is_array(@$adminmenu)) { |
116 | 116 | foreach ($adminmenu as $eachmenu) { |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | $xoops_breadcrumbs = [ |
132 | 132 | [ |
133 | - 'url' => XOOPS_URL . '/admin.php', |
|
133 | + 'url' => XOOPS_URL.'/admin.php', |
|
134 | 134 | 'name' => _CPHOME, |
135 | 135 | ], |
136 | 136 | ]; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | // get block_arr |
143 | 143 | $db = XoopsDatabaseFactory::getDatabaseConnection(); |
144 | -$sql = 'SELECT DISTINCT gperm_itemid FROM ' . $db->prefix('group_permission') . " WHERE gperm_name = 'block_read' AND gperm_modid = 1 AND gperm_groupid IN (" . implode(',', $xoopsUser->getGroups()) . ')'; |
|
144 | +$sql = 'SELECT DISTINCT gperm_itemid FROM '.$db->prefix('group_permission')." WHERE gperm_name = 'block_read' AND gperm_modid = 1 AND gperm_groupid IN (".implode(',', $xoopsUser->getGroups()).')'; |
|
145 | 145 | $result = $db->query($sql); |
146 | 146 | |
147 | 147 | $blockids = []; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | global $block_arr, $i; // for piCal :-) |
153 | 153 | $block_arr = []; |
154 | 154 | if (!empty($blockids)) { |
155 | - $sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b, ' . $db->prefix('block_module_link') . ' m WHERE m.block_id=b.bid AND b.isactive=1 AND b.visible=1 AND m.module_id=' . (int)$altsysModuleId . ' AND b.bid IN (' . implode(',', $blockids) . ') ORDER BY b.weight,b.bid'; |
|
155 | + $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid AND b.isactive=1 AND b.visible=1 AND m.module_id='.(int)$altsysModuleId.' AND b.bid IN ('.implode(',', $blockids).') ORDER BY b.weight,b.bid'; |
|
156 | 156 | |
157 | 157 | $result = $db->query($sql); |
158 | 158 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $btpl = $block_arr[$i]->getVar('template'); |
191 | 191 | |
192 | 192 | if ('' != $btpl) { |
193 | - if (empty($bcachetime) || !$xoopsTpl->is_cached('db:' . $btpl, 'blk_' . $block_arr[$i]->getVar('bid'))) { |
|
193 | + if (empty($bcachetime) || !$xoopsTpl->is_cached('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid'))) { |
|
194 | 194 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name')); |
195 | 195 | |
196 | 196 | $bresult = $block_arr[$i]->buildBlock(); |
@@ -201,18 +201,18 @@ discard block |
||
201 | 201 | |
202 | 202 | $xoopsTpl->assign_by_ref('block', $bresult); |
203 | 203 | |
204 | - $bcontent = $xoopsTpl->fetch('db:' . $btpl, 'blk_' . $block_arr[$i]->getVar('bid')); |
|
204 | + $bcontent = $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid')); |
|
205 | 205 | |
206 | 206 | $xoopsTpl->clear_assign('block'); |
207 | 207 | } else { |
208 | 208 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime); |
209 | 209 | |
210 | - $bcontent = $xoopsTpl->fetch('db:' . $btpl, 'blk_' . $block_arr[$i]->getVar('bid')); |
|
210 | + $bcontent = $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid')); |
|
211 | 211 | } |
212 | 212 | } else { |
213 | 213 | $bid = $block_arr[$i]->getVar('bid'); |
214 | 214 | |
215 | - if (empty($bcachetime) || !$xoopsTpl->is_cached('db:system_dummy.tpl', 'blk_' . $bid)) { |
|
215 | + if (empty($bcachetime) || !$xoopsTpl->is_cached('db:system_dummy.tpl', 'blk_'.$bid)) { |
|
216 | 216 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name')); |
217 | 217 | |
218 | 218 | $bresult = $block_arr[$i]->buildBlock(); |
@@ -223,13 +223,13 @@ discard block |
||
223 | 223 | |
224 | 224 | $xoopsTpl->assign_by_ref('dummy_content', $bresult['content']); |
225 | 225 | |
226 | - $bcontent = $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_' . $bid); |
|
226 | + $bcontent = $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_'.$bid); |
|
227 | 227 | |
228 | 228 | $xoopsTpl->clear_assign('block'); |
229 | 229 | } else { |
230 | 230 | $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime); |
231 | 231 | |
232 | - $bcontent = $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_' . $bid); |
|
232 | + $bcontent = $xoopsTpl->fetch('db:system_dummy.tpl', 'blk_'.$bid); |
|
233 | 233 | } |
234 | 234 | } |
235 | 235 | |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | |
282 | 282 | // FALLBACK inserting admin_menu_block in admin side |
283 | 283 | if (!$adminmenublock_exists) { |
284 | - require_once XOOPS_ROOT_PATH . '/modules/altsys/blocks/blocks.php'; |
|
284 | + require_once XOOPS_ROOT_PATH.'/modules/altsys/blocks/blocks.php'; |
|
285 | 285 | |
286 | 286 | $admin_menu_block = [b_altsys_admin_menu_show(['altsys'])]; |
287 | 287 |
@@ -5,19 +5,19 @@ |
||
5 | 5 | } |
6 | 6 | |
7 | 7 | // templates/ under the theme |
8 | -$tplsadmin_autoupdate_path = XOOPS_THEME_PATH . '/' . $xoopsConfig['theme_set'] . '/templates'; |
|
8 | +$tplsadmin_autoupdate_path = XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/templates'; |
|
9 | 9 | |
10 | -if ($handler = @opendir($tplsadmin_autoupdate_path . '/')) { |
|
10 | +if ($handler = @opendir($tplsadmin_autoupdate_path.'/')) { |
|
11 | 11 | while (false !== ($file = readdir($handler))) { |
12 | - $file_path = $tplsadmin_autoupdate_path . '/' . $file; |
|
12 | + $file_path = $tplsadmin_autoupdate_path.'/'.$file; |
|
13 | 13 | |
14 | 14 | if (is_file($file_path) && '.tpl' == mb_substr($file, -5)) { |
15 | 15 | $mtime = (int)(@filemtime($file_path)); |
16 | 16 | |
17 | - list($count) = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('tplfile') . " WHERE tpl_tplset='" . addslashes($xoopsConfig['template_set']) . "' AND tpl_file='" . addslashes($file) . "' AND tpl_lastmodified >= $mtime")); |
|
17 | + list($count) = $xoopsDB->fetchRow($xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('tplfile')." WHERE tpl_tplset='".addslashes($xoopsConfig['template_set'])."' AND tpl_file='".addslashes($file)."' AND tpl_lastmodified >= $mtime")); |
|
18 | 18 | |
19 | 19 | if ($count <= 0) { |
20 | - include_once XOOPS_TRUST_PATH . '/libs/altsys/include/tpls_functions.php'; |
|
20 | + include_once XOOPS_TRUST_PATH.'/libs/altsys/include/tpls_functions.php'; |
|
21 | 21 | |
22 | 22 | tplsadmin_import_data($xoopsConfig['template_set'], $file, implode('', file($file_path)), $mtime); |
23 | 23 | } |