@@ -40,26 +40,26 @@ |
||
40 | 40 | $xoopsOption['nocommon'] = true; |
41 | 41 | session_start(); |
42 | 42 | } |
43 | -$mainfile = dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
43 | +$mainfile = dirname(dirname(__DIR__)).'/mainfile.php'; |
|
44 | 44 | if (file_exists($mainfile)) { |
45 | 45 | include $mainfile; |
46 | 46 | } |
47 | 47 | if (!defined("XOOPS_ROOT_PATH")) { |
48 | 48 | define("XOOPS_ROOT_PATH", str_replace("\\", "/", realpath('../'))); |
49 | - define("XOOPS_PATH", isset($_SESSION['settings']['PATH']) ? $_SESSION['settings']['PATH']:""); |
|
50 | - define("XOOPS_VAR_PATH", isset($_SESSION['settings']['VAR_PATH']) ? $_SESSION['settings']['VAR_PATH']:""); |
|
51 | - define("XOOPS_URL", isset($_SESSION['settings']['URL']) ? $_SESSION['settings']['URL']:""); |
|
49 | + define("XOOPS_PATH", isset($_SESSION['settings']['PATH']) ? $_SESSION['settings']['PATH'] : ""); |
|
50 | + define("XOOPS_VAR_PATH", isset($_SESSION['settings']['VAR_PATH']) ? $_SESSION['settings']['VAR_PATH'] : ""); |
|
51 | + define("XOOPS_URL", isset($_SESSION['settings']['URL']) ? $_SESSION['settings']['URL'] : ""); |
|
52 | 52 | } |
53 | 53 | |
54 | -include XOOPS_INSTALL_PATH . '/class/installwizard.php'; |
|
55 | -include_once XOOPS_ROOT_PATH . '/include/version.php'; |
|
56 | -include_once XOOPS_INSTALL_PATH . '/include/functions.php'; |
|
54 | +include XOOPS_INSTALL_PATH.'/class/installwizard.php'; |
|
55 | +include_once XOOPS_ROOT_PATH.'/include/version.php'; |
|
56 | +include_once XOOPS_INSTALL_PATH.'/include/functions.php'; |
|
57 | 57 | //include_once XOOPS_ROOT_PATH . '/class/xoopsload.php'; |
58 | 58 | if (!class_exists('XoopsBaseConfig', false)) { |
59 | - include_once XOOPS_ROOT_PATH . '/class/XoopsBaseConfig.php'; |
|
59 | + include_once XOOPS_ROOT_PATH.'/class/XoopsBaseConfig.php'; |
|
60 | 60 | XoopsBaseConfig::bootstrapTransition(); |
61 | 61 | } |
62 | -include_once XOOPS_ROOT_PATH . '/include/defines.php'; |
|
62 | +include_once XOOPS_ROOT_PATH.'/include/defines.php'; |
|
63 | 63 | $_SESSION['pageHasHelp'] = false; |
64 | 64 | $_SESSION['pageHasForm'] = false; |
65 | 65 |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | $available_pdo_drivers = \PDO::getAvailableDrivers(); |
32 | 32 | $configs['db_types'] = array(); |
33 | 33 | if (in_array('mysql', $available_pdo_drivers)) { |
34 | - $configs['db_types']['pdo_mysql'] = array( |
|
34 | + $configs['db_types']['pdo_mysql'] = array( |
|
35 | 35 | 'desc' => 'PDO MySql Driver', |
36 | 36 | 'type' => 'mysql', |
37 | 37 | 'params' => 'dbname,host,user,password,port,unix_socket', |
38 | - 'ignoredb' => array('information_schema','test'), |
|
38 | + 'ignoredb' => array('information_schema', 'test'), |
|
39 | 39 | ); |
40 | 40 | } |
41 | 41 | if (in_array('sqlite', $available_pdo_drivers)) { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | 'desc' => 'Mysqli Driver (untested)', |
100 | 100 | 'type' => 'mysql', |
101 | 101 | 'params' => 'dbname,host,user,password,port,unix_socket', |
102 | - 'ignoredb' => array('information_schema','test'), |
|
102 | + 'ignoredb' => array('information_schema', 'test'), |
|
103 | 103 | ); |
104 | 104 | } |
105 | 105 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | 'xml' => array('XML', sprintf(PHP_EXTENSION, XML_PARSING)), |
142 | 142 | 'zlib' => array('Zlib', sprintf(PHP_EXTENSION, ZLIB_COMPRESSION)), |
143 | 143 | 'gd' => array( |
144 | - (function_exists('gd_info') && $gdlib = @gd_info()) ? 'GD ' . $gdlib['GD Version'] : '', |
|
144 | + (function_exists('gd_info') && $gdlib = @gd_info()) ? 'GD '.$gdlib['GD Version'] : '', |
|
145 | 145 | sprintf(PHP_EXTENSION, IMAGE_FUNCTIONS) |
146 | 146 | ), |
147 | 147 | 'exif' => array('Exif', sprintf(PHP_EXTENSION, IMAGE_METAS)), |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | case 'select': |
66 | 66 | $ele = new Xoops\Form\Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
67 | - $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); |
|
67 | + $options = & $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); |
|
68 | 68 | $opcount = count($options); |
69 | 69 | for ($j = 0; $j < $opcount; ++$j) { |
70 | 70 | $optval = \Xoops\Locale::translate($options[$j]->getVar('confop_value'), 'system'); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | case 'select_multi': |
77 | 77 | $ele = new Xoops\Form\Select($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true); |
78 | - $options =& $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); |
|
78 | + $options = & $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); |
|
79 | 79 | $opcount = count($options); |
80 | 80 | for ($j = 0; $j < $opcount; ++$j) { |
81 | 81 | $optval = \Xoops\Locale::translate($options[$j]->getVar('confop_value'), 'system'); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $module_handler = $xoops->getHandlerModule(); |
128 | 128 | $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); |
129 | 129 | $criteria->add(new Criteria('isactive', 1)); |
130 | - $moduleslist =& $module_handler->getNameList($criteria, true); |
|
130 | + $moduleslist = & $module_handler->getNameList($criteria, true); |
|
131 | 131 | $moduleslist['--'] = XoopsLocale::NONE; |
132 | 132 | $ele->addOptionArray($moduleslist); |
133 | 133 | break; |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $ele = new Xoops\Form\ElementTray($title, '<br />'); |
171 | 171 | foreach (array_keys($modules) as $mid) { |
172 | 172 | $c_val = isset($currrent_val[$mid]) ? (int)($currrent_val[$mid]) : null; |
173 | - $selform = new Xoops\Form\Select($modules[$mid]->getVar('name'), $config[$i]->getVar('conf_name') . "[$mid]", $c_val); |
|
173 | + $selform = new Xoops\Form\Select($modules[$mid]->getVar('name'), $config[$i]->getVar('conf_name')."[$mid]", $c_val); |
|
174 | 174 | $selform->addOptionArray($cache_options); |
175 | 175 | $ele->addElement($selform); |
176 | 176 | unset($selform); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | */ |
237 | 237 | function createThemeform(XoopsConfigItem $config) |
238 | 238 | { |
239 | - $title = $config->getVar('conf_desc') == '' ? \Xoops\Locale::translate($config->getVar('conf_title'), 'system') : \Xoops\Locale::translate($config->getVar('conf_title'), 'system') . '<br /><br /><span>' . \Xoops\Locale::translate($config->getVar('conf_desc'), 'system') . '</span>'; |
|
239 | + $title = $config->getVar('conf_desc') == '' ? \Xoops\Locale::translate($config->getVar('conf_title'), 'system') : \Xoops\Locale::translate($config->getVar('conf_title'), 'system').'<br /><br /><span>'.\Xoops\Locale::translate($config->getVar('conf_desc'), 'system').'</span>'; |
|
240 | 240 | $form_theme_set = new Xoops\Form\Select('', $config->getVar('conf_name'), $config->getConfValueForOutput(), 1, false); |
241 | 241 | $dirlist = XoopsLists::getThemesList(); |
242 | 242 | if (!empty($dirlist)) { |
@@ -269,18 +269,18 @@ discard block |
||
269 | 269 | } else { |
270 | 270 | $label_content .= "<div id='$theme' rel='theme' style='display:none;'>"; |
271 | 271 | } |
272 | - if (file_exists(XOOPS_ROOT_PATH . "/themes/$theme/theme.ini")) { |
|
273 | - $theme_ini = parse_ini_file(XOOPS_ROOT_PATH . "/themes/$theme/theme.ini"); |
|
272 | + if (file_exists(XOOPS_ROOT_PATH."/themes/$theme/theme.ini")) { |
|
273 | + $theme_ini = parse_ini_file(XOOPS_ROOT_PATH."/themes/$theme/theme.ini"); |
|
274 | 274 | if ($theme_ini['screenshot'] == '') { |
275 | 275 | $theme_ini['screenshot'] = 'screenshot.png'; |
276 | 276 | $theme_ini['thumbnail'] = 'thumbnail.png'; |
277 | 277 | } |
278 | 278 | } |
279 | 279 | |
280 | - if ($theme_ini['screenshot'] != '' && file_exists(XOOPS_ROOT_PATH . "/themes/$theme/" . $theme_ini['screenshot'])) { |
|
281 | - $label_content .= "<img src='" . XOOPS_URL . "/themes/" . $theme . "/" . $theme_ini['screenshot'] . "' alt='Screenshot' />"; |
|
282 | - } elseif ($theme_ini['thumbnail'] != '' && file_exists(XOOPS_ROOT_PATH . "/themes/$theme/" . $theme_ini['thumbnail'])) { |
|
283 | - $label_content .= "<img src='" . XOOPS_URL . "/themes/" . $theme . "/" . $theme_ini['thumbnail'] . "' alt='$theme' />"; |
|
280 | + if ($theme_ini['screenshot'] != '' && file_exists(XOOPS_ROOT_PATH."/themes/$theme/".$theme_ini['screenshot'])) { |
|
281 | + $label_content .= "<img src='".XOOPS_URL."/themes/".$theme."/".$theme_ini['screenshot']."' alt='Screenshot' />"; |
|
282 | + } elseif ($theme_ini['thumbnail'] != '' && file_exists(XOOPS_ROOT_PATH."/themes/$theme/".$theme_ini['thumbnail'])) { |
|
283 | + $label_content .= "<img src='".XOOPS_URL."/themes/".$theme."/".$theme_ini['thumbnail']."' alt='$theme' />"; |
|
284 | 284 | } else { |
285 | 285 | $label_content .= THEME_NO_SCREENSHOT; |
286 | 286 | } |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | |
293 | 293 | $form = new Xoops\Form\ThemeForm($title, 'themes', 'index.php', 'post'); |
294 | 294 | $form->addElement($form_theme_set); |
295 | - $form->addElement(new Xoops\Form\Label('', "<div id='screenshot'>" . $label_content . "</div>")); |
|
295 | + $form->addElement(new Xoops\Form\Label('', "<div id='screenshot'>".$label_content."</div>")); |
|
296 | 296 | |
297 | 297 | $form->addElement(new Xoops\Form\Hidden('conf_ids[]', $config->getVar('conf_id'))); |
298 | 298 | return array($form); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @version $Id$ |
25 | 25 | */ |
26 | 26 | |
27 | -require_once __DIR__ . '/include/common.inc.php'; |
|
27 | +require_once __DIR__.'/include/common.inc.php'; |
|
28 | 28 | |
29 | 29 | /* @var $wizard XoopsInstallWizard */ |
30 | 30 | $wizard = $_SESSION['wizard']; |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | } |
38 | 38 | // get list of parameters the selected drive accepts |
39 | 39 | $driver_info = $wizard->configs['db_types'][$settings['DB_DRIVER']]; |
40 | -$driver_params=explode(',', $driver_info['params']); |
|
40 | +$driver_params = explode(',', $driver_info['params']); |
|
41 | 41 | $settings['DB_TYPE'] = $driver_info['type']; |
42 | 42 | |
43 | 43 | // get settings name and value (post, session or default) for each parameter |
44 | 44 | foreach ($driver_params as $param) { |
45 | - $name=false; |
|
45 | + $name = false; |
|
46 | 46 | if (!empty($wizard->configs['db_param_names'][$param])) { |
47 | - $name=$wizard->configs['db_param_names'][$param]; |
|
47 | + $name = $wizard->configs['db_param_names'][$param]; |
|
48 | 48 | $default = null; |
49 | 49 | switch ($param) { |
50 | 50 | case 'host': |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | if ($_SERVER['REQUEST_METHOD'] === 'POST') { |
83 | 83 | $value = empty($_POST[$name]) ? $default : $_POST[$name]; |
84 | 84 | } |
85 | - $settings[$name]=$value; |
|
85 | + $settings[$name] = $value; |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | ob_start(); |
103 | 103 | ?> |
104 | 104 | <?php if (!empty($error)) { |
105 | - echo '<div class="x2-note errorMsg">' . $error . "</div>\n"; |
|
105 | + echo '<div class="x2-note errorMsg">'.$error."</div>\n"; |
|
106 | 106 | } ?> |
107 | 107 | <fieldset> |
108 | 108 | <legend><?php echo LEGEND_CONNECTION; ?> |
@@ -111,26 +111,26 @@ discard block |
||
111 | 111 | <?php |
112 | 112 | foreach ($driver_params as $param) { |
113 | 113 | $name = $wizard->configs['db_param_names'][$param]; |
114 | - if ($wizard->configs['db_param_types'][$param]==='string') { |
|
114 | + if ($wizard->configs['db_param_types'][$param] === 'string') { |
|
115 | 115 | echo xoFormField( |
116 | 116 | $name, |
117 | 117 | $settings[$name], |
118 | - constant($name . '_LABEL'), |
|
119 | - constant($name . '_HELP') |
|
118 | + constant($name.'_LABEL'), |
|
119 | + constant($name.'_HELP') |
|
120 | 120 | ); |
121 | - } elseif ($wizard->configs['db_param_types'][$param]==='boolean') { |
|
121 | + } elseif ($wizard->configs['db_param_types'][$param] === 'boolean') { |
|
122 | 122 | echo xoBoolField( |
123 | 123 | $name, |
124 | 124 | $settings[$name], |
125 | - constant($name . '_LABEL'), |
|
126 | - constant($name . '_HELP') |
|
125 | + constant($name.'_LABEL'), |
|
126 | + constant($name.'_HELP') |
|
127 | 127 | ); |
128 | - } elseif ($wizard->configs['db_param_types'][$param]==='password') { |
|
128 | + } elseif ($wizard->configs['db_param_types'][$param] === 'password') { |
|
129 | 129 | echo xoPassField( |
130 | 130 | $name, |
131 | 131 | $settings[$name], |
132 | - constant($name . '_LABEL'), |
|
133 | - constant($name . '_HELP') |
|
132 | + constant($name.'_LABEL'), |
|
133 | + constant($name.'_HELP') |
|
134 | 134 | ); |
135 | 135 | } |
136 | 136 | } |
@@ -154,4 +154,4 @@ discard block |
||
154 | 154 | $_SESSION['pageHasForm'] = true; |
155 | 155 | $_SESSION['content'] = $content; |
156 | 156 | $_SESSION['settings'] = $settings; |
157 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
157 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @version $Id$ |
25 | 25 | */ |
26 | 26 | |
27 | -require_once __DIR__ . '/include/common.inc.php'; |
|
27 | +require_once __DIR__.'/include/common.inc.php'; |
|
28 | 28 | |
29 | 29 | $xoops = Xoops::getInstance(); |
30 | 30 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | setcookie('xo_install_user', '', null, null, null); |
35 | 35 | |
36 | -$installer_modified = "install_remove_" . uniqid(mt_rand()); |
|
36 | +$installer_modified = "install_remove_".uniqid(mt_rand()); |
|
37 | 37 | register_shutdown_function('install_finalize', $installer_modified); |
38 | 38 | |
39 | 39 | $_SESSION['installer_modified'] = $installer_modified; |
@@ -44,5 +44,5 @@ discard block |
||
44 | 44 | $_SESSION['pageHasHelp'] = false; |
45 | 45 | $_SESSION['pageHasForm'] = false; |
46 | 46 | $_SESSION['content'] = $content; |
47 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
47 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
|
48 | 48 | $_SESSION = array(); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $xoopsOption['checkadmin'] = true; |
26 | 26 | $xoopsOption['hascommon'] = true; |
27 | 27 | |
28 | -require_once __DIR__ . '/include/common.inc.php'; |
|
28 | +require_once __DIR__.'/include/common.inc.php'; |
|
29 | 29 | |
30 | 30 | $xoops = Xoops::getInstance(); |
31 | 31 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | if ($_SERVER['REQUEST_METHOD'] === 'POST') { |
37 | 37 | if (array_key_exists('conf_ids', $_REQUEST)) { |
38 | 38 | foreach ($_REQUEST['conf_ids'] as $key => $conf_id) { |
39 | - $config =& $config_handler->getConfig($conf_id); |
|
39 | + $config = & $config_handler->getConfig($conf_id); |
|
40 | 40 | $new_value = $_REQUEST[$config->getVar('conf_name')]; |
41 | 41 | $config->setConfValueForInput($new_value); |
42 | 42 | $config_handler->insertConfig($config); |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | $tempvar = $config_handler->getConfigs($criteria); |
59 | 59 | $config = array_pop($tempvar); |
60 | 60 | |
61 | -include XOOPS_INSTALL_PATH . '/include/createconfigform.php'; |
|
61 | +include XOOPS_INSTALL_PATH.'/include/createconfigform.php'; |
|
62 | 62 | $wizard->form = createThemeform($config); |
63 | 63 | $content = $wizard->CreateForm(); |
64 | 64 | |
65 | 65 | $_SESSION['pageHasHelp'] = false; |
66 | 66 | $_SESSION['pageHasForm'] = false; |
67 | 67 | $_SESSION['content'] = $content; |
68 | -include XOOPS_INSTALL_PATH . '/include/install_tpl.php'; |
|
68 | +include XOOPS_INSTALL_PATH.'/include/install_tpl.php'; |
@@ -100,16 +100,16 @@ discard block |
||
100 | 100 | $this->xoopsPath['root'] = $path; |
101 | 101 | } |
102 | 102 | // Firstly, locate XOOPS lib folder out of XOOPS root folder |
103 | - $this->xoopsPath['lib'] = dirname($path) . "/" . ($this->xoopsPathDefault['lib']); |
|
103 | + $this->xoopsPath['lib'] = dirname($path)."/".($this->xoopsPathDefault['lib']); |
|
104 | 104 | // If the folder is not created, re-locate XOOPS lib folder inside XOOPS root folder |
105 | - if (!is_dir($this->xoopsPath['lib'] . "/")) { |
|
106 | - $this->xoopsPath['lib'] = $path . "/" . ($this->xoopsPathDefault['lib']); |
|
105 | + if (!is_dir($this->xoopsPath['lib']."/")) { |
|
106 | + $this->xoopsPath['lib'] = $path."/".($this->xoopsPathDefault['lib']); |
|
107 | 107 | } |
108 | 108 | // Firstly, locate XOOPS data folder out of XOOPS root folder |
109 | - $this->xoopsPath['data'] = dirname($path) . "/" . ($this->xoopsPathDefault['data']); |
|
109 | + $this->xoopsPath['data'] = dirname($path)."/".($this->xoopsPathDefault['data']); |
|
110 | 110 | // If the folder is not created, re-locate XOOPS data folder inside XOOPS root folder |
111 | - if (!is_dir($this->xoopsPath['data'] . "/")) { |
|
112 | - $this->xoopsPath['data'] = $path . "/" . ($this->xoopsPathDefault['data']); |
|
111 | + if (!is_dir($this->xoopsPath['data']."/")) { |
|
112 | + $this->xoopsPath['data'] = $path."/".($this->xoopsPathDefault['data']); |
|
113 | 113 | } |
114 | 114 | } |
115 | 115 | if (isset($_SESSION['settings']['URL'])) { |
@@ -230,19 +230,19 @@ discard block |
||
230 | 230 | if (is_array($path)) { |
231 | 231 | foreach (array_keys($path) as $item) { |
232 | 232 | if (is_string($item)) { |
233 | - $error[$parent . "/" . $item] = $this->makeWritable($parent . "/" . $item); |
|
233 | + $error[$parent."/".$item] = $this->makeWritable($parent."/".$item); |
|
234 | 234 | if (empty($path[$item])) { |
235 | 235 | continue; |
236 | 236 | } |
237 | 237 | foreach ($path[$item] as $child) { |
238 | - $this->setPermission($parent . "/" . $item, $child, $error); |
|
238 | + $this->setPermission($parent."/".$item, $child, $error); |
|
239 | 239 | } |
240 | 240 | } else { |
241 | - $error[$parent . "/" . $path[$item]] = $this->makeWritable($parent . "/" . $path[$item]); |
|
241 | + $error[$parent."/".$path[$item]] = $this->makeWritable($parent."/".$path[$item]); |
|
242 | 242 | } |
243 | 243 | } |
244 | 244 | } else { |
245 | - $error[$parent . "/" . $path] = $this->makeWritable($parent . "/" . $path); |
|
245 | + $error[$parent."/".$path] = $this->makeWritable($parent."/".$path); |
|
246 | 246 | } |
247 | 247 | return; |
248 | 248 | } |
@@ -64,12 +64,12 @@ discard block |
||
64 | 64 | $this->initLanguage(!empty($_COOKIE['xo_install_lang']) ? $_COOKIE['xo_install_lang'] : 'en_US'); |
65 | 65 | // Setup pages |
66 | 66 | $pages = array(); |
67 | - include_once dirname(__DIR__) . '/include/page.php'; |
|
67 | + include_once dirname(__DIR__).'/include/page.php'; |
|
68 | 68 | $this->pages = $pages; |
69 | 69 | |
70 | 70 | // Load default configs |
71 | 71 | $configs = array(); |
72 | - include_once dirname(__DIR__) . '/include/config.php'; |
|
72 | + include_once dirname(__DIR__).'/include/config.php'; |
|
73 | 73 | $this->configs = $configs; |
74 | 74 | |
75 | 75 | if (!$this->checkAccess()) { |
@@ -135,10 +135,10 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function loadLangFile($file) |
137 | 137 | { |
138 | - if (file_exists($file = XOOPS_INSTALL_PATH . "/locale/{$this->language}/{$file}.php")) { |
|
138 | + if (file_exists($file = XOOPS_INSTALL_PATH."/locale/{$this->language}/{$file}.php")) { |
|
139 | 139 | include_once $file; |
140 | 140 | } else { |
141 | - $file = XOOPS_INSTALL_PATH . "/locale/en_US/{$file}.php"; |
|
141 | + $file = XOOPS_INSTALL_PATH."/locale/en_US/{$file}.php"; |
|
142 | 142 | include_once $file; |
143 | 143 | } |
144 | 144 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | public function initLanguage($language) |
152 | 152 | { |
153 | 153 | $language = preg_replace("/[^a-z0-9_\-]/i", "", $language); |
154 | - if (!file_exists(XOOPS_INSTALL_PATH . "/locale/{$language}/install.php")) { |
|
154 | + if (!file_exists(XOOPS_INSTALL_PATH."/locale/{$language}/install.php")) { |
|
155 | 155 | $language = 'en_US'; |
156 | 156 | } |
157 | 157 | $this->language = $language; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $proto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ? 'https' : 'http'; |
194 | 194 | $host = $_SERVER['HTTP_HOST']; |
195 | 195 | $base = substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')); |
196 | - return $proto . '://' . $host . $base; |
|
196 | + return $proto.'://'.$host.$base; |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | /** |
@@ -218,13 +218,13 @@ discard block |
||
218 | 218 | } |
219 | 219 | if (!isset($pages[$pageIndex])) { |
220 | 220 | if (defined("XOOPS_URL")) { |
221 | - return XOOPS_URL . '/'; |
|
221 | + return XOOPS_URL.'/'; |
|
222 | 222 | } else { |
223 | 223 | return $this->baseLocation(); |
224 | 224 | } |
225 | 225 | } |
226 | 226 | $page = $pages[$pageIndex]; |
227 | - return $this->baseLocation() . "/page_{$page}.php"; |
|
227 | + return $this->baseLocation()."/page_{$page}.php"; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | /** |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | |
254 | 254 | /* @var Xoops\Form\Form $form */ |
255 | 255 | foreach ($this->form as $form) { |
256 | - $ret .= "<fieldset><legend>" . $form->getTitle() . "</legend>\n"; |
|
256 | + $ret .= "<fieldset><legend>".$form->getTitle()."</legend>\n"; |
|
257 | 257 | |
258 | 258 | /* @var Xoops\Form\Element $ele */ |
259 | 259 | foreach ($form->getElements() as $ele) { |
@@ -261,31 +261,31 @@ discard block |
||
261 | 261 | if ($ele instanceof Xoops\Form\Element) { |
262 | 262 | if (!$ele->isHidden()) { |
263 | 263 | if (($caption = $ele->getCaption()) != '') { |
264 | - $ret .= "<label class='xolabel' for='" . $ele->getName() . "'>" . $caption . "</label>"; |
|
264 | + $ret .= "<label class='xolabel' for='".$ele->getName()."'>".$caption."</label>"; |
|
265 | 265 | if (($desc = $ele->getDescription()) != '') { |
266 | 266 | $ret .= "<div class='xoform-help'>"; |
267 | 267 | $ret .= $desc; |
268 | 268 | $ret .= "</div>"; |
269 | 269 | } |
270 | 270 | } |
271 | - $ret .= $ele->render() . "\n"; |
|
271 | + $ret .= $ele->render()."\n"; |
|
272 | 272 | } else { |
273 | - $hidden .= $ele->render() . "\n"; |
|
273 | + $hidden .= $ele->render()."\n"; |
|
274 | 274 | } |
275 | 275 | } |
276 | 276 | } |
277 | - $ret .= "</fieldset>\n" . $hidden . "\n" . $form->renderValidationJS(true); |
|
277 | + $ret .= "</fieldset>\n".$hidden."\n".$form->renderValidationJS(true); |
|
278 | 278 | } |
279 | 279 | return $ret; |
280 | 280 | } |
281 | 281 | |
282 | 282 | function cleanCache($cacheFolder) { |
283 | - $cache = array(1,2,3); |
|
283 | + $cache = array(1, 2, 3); |
|
284 | 284 | if (!empty($cache)) { |
285 | 285 | for ($i = 0; $i < count($cache); ++$i) { |
286 | 286 | switch ($cache[$i]) { |
287 | 287 | case 1: |
288 | - $files = glob($cacheFolder. '/caches/smarty_cache/*.*'); |
|
288 | + $files = glob($cacheFolder.'/caches/smarty_cache/*.*'); |
|
289 | 289 | foreach ($files as $filename) { |
290 | 290 | if (basename(strtolower($filename)) !== 'index.html') { |
291 | 291 | unlink($filename); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | break; |
295 | 295 | |
296 | 296 | case 2: |
297 | - $files = glob($cacheFolder . '/caches/smarty_compile/*.*'); |
|
297 | + $files = glob($cacheFolder.'/caches/smarty_compile/*.*'); |
|
298 | 298 | foreach ($files as $filename) { |
299 | 299 | if (basename(strtolower($filename)) !== 'index.html') { |
300 | 300 | unlink($filename); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | break; |
304 | 304 | |
305 | 305 | case 3: |
306 | - $files = glob($cacheFolder . '/caches/xoops_cache/*.*'); |
|
306 | + $files = glob($cacheFolder.'/caches/xoops_cache/*.*'); |
|
307 | 307 | foreach ($files as $filename) { |
308 | 308 | if (basename(strtolower($filename)) !== 'index.html') { |
309 | 309 | unlink($filename); |
@@ -25,5 +25,5 @@ |
||
25 | 25 | * @version $Id$ |
26 | 26 | */ |
27 | 27 | |
28 | -require_once __DIR__ . '/page_langselect.php'; |
|
28 | +require_once __DIR__.'/page_langselect.php'; |
|
29 | 29 | exit(); |