diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-09 19:29:51 -0600 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-12-09 19:29:51 -0600 |
commit | 30de17f69f70a0c23fa314de479bac57e3dbae2b (patch) | |
tree | 7f431ad636006a0e4216bf9dbcc31d24e64295b7 | |
parent | bff76f9ca81e30a03f116669645774ebd49ba1b1 (diff) | |
download | forums-30de17f69f70a0c23fa314de479bac57e3dbae2b.tar forums-30de17f69f70a0c23fa314de479bac57e3dbae2b.tar.gz forums-30de17f69f70a0c23fa314de479bac57e3dbae2b.tar.bz2 forums-30de17f69f70a0c23fa314de479bac57e3dbae2b.tar.xz forums-30de17f69f70a0c23fa314de479bac57e3dbae2b.zip |
[ticket/11259] adm_relative_path -> phpbb_adm_relative_path
We can assume they properly format their config settings, right?
PHPBB3-11259
-rw-r--r-- | phpBB/common.php | 6 | ||||
-rw-r--r-- | phpBB/includes/di/extension/config.php | 2 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 6 | ||||
-rw-r--r-- | phpBB/install/index.php | 6 | ||||
-rw-r--r-- | phpBB/install/install_update.php | 10 | ||||
-rw-r--r-- | phpBB/viewonline.php | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/phpBB/common.php b/phpBB/common.php index ff128553ab..f974c9ba2f 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -63,9 +63,9 @@ if (!defined('PHPBB_INSTALLED')) exit; } -// In case $adm_relative_path is not set (in case of an update), use the default. -$adm_relative_path = (isset($adm_relative_path)) ? ((substr($adm_relative_path, -1) == '/') ? $adm_relative_path : $adm_relative_path . '/') : 'adm/'; -$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $adm_relative_path; +// In case $phpbb_adm_relative_path is not set (in case of an update), use the default. +$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/'; +$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path; // Include files require($phpbb_root_path . 'includes/class_loader.' . $phpEx); diff --git a/phpBB/includes/di/extension/config.php b/phpBB/includes/di/extension/config.php index bb3c04637a..59b4c66870 100644 --- a/phpBB/includes/di/extension/config.php +++ b/phpBB/includes/di/extension/config.php @@ -42,7 +42,7 @@ class phpbb_di_extension_config extends Extension { require($this->config_file); - $container->setParameter('core.adm_relative_path', (isset($adm_relative_path) ? $adm_relative_path : 'adm/')); + $container->setParameter('core.adm_relative_path', (isset($phpbb_adm_relative_path) ? $phpbb_adm_relative_path : 'adm/')); $container->setParameter('core.table_prefix', $table_prefix); $container->setParameter('cache.driver.class', $this->fix_acm_type($acm_type)); $container->setParameter('dbal.driver.class', 'dbal_'.$dbms); diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 38bfe978e5..1600b7bd10 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -73,9 +73,9 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type)) die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update."); } -// In case $adm_relative_path is not set (in case of an update), use the default. -$adm_relative_path = (isset($adm_relative_path)) ? ((substr($adm_relative_path, -1) == '/') ? $adm_relative_path : $adm_relative_path . '/') : 'adm/'; -$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $adm_relative_path; +// In case $phpbb_adm_relative_path is not set (in case of an update), use the default. +$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/'; +$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path; // Include files require($phpbb_root_path . 'includes/class_loader.' . $phpEx); diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 22dc12fe99..69e9e7de42 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -73,9 +73,9 @@ else } @ini_set('memory_limit', $mem_limit); -// In case $adm_relative_path is not set (in case of an update), use the default. -$adm_relative_path = (isset($adm_relative_path)) ? ((substr($adm_relative_path, -1) == '/') ? $adm_relative_path : $adm_relative_path . '/') : 'adm/'; -$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $adm_relative_path; +// In case $phpbb_adm_relative_path is not set (in case of an update), use the default. +$phpbb_adm_relative_path = (isset($phpbb_adm_relative_path)) ? $phpbb_adm_relative_path : 'adm/'; +$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : $phpbb_root_path . $phpbb_adm_relative_path; // Include essential scripts require($phpbb_root_path . 'includes/class_loader.' . $phpEx); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 679850db31..55dba9a935 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -72,7 +72,7 @@ class install_update extends module function main($mode, $sub) { global $phpbb_style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language; - global $request, $phpbb_admin_path, $adm_relative_path; + global $request, $phpbb_admin_path, $phpbb_adm_relative_path; $this->tpl_name = 'install_update'; $this->page_title = 'UPDATE_INSTALLATION'; @@ -216,7 +216,7 @@ class install_update extends module if ($this->test_update === false) { // Got the updater template itself updated? If so, we are able to directly use it - but only if all three files are present - if (in_array($adm_relative_path . 'style/install_update.html', $this->update_info['files'])) + if (in_array($phpbb_adm_relative_path . 'style/install_update.html', $this->update_info['files'])) { $this->tpl_name = '../../install/update/new/adm/style/install_update'; } @@ -493,7 +493,7 @@ class install_update extends module $template->assign_vars(array( 'S_FILE_CHECK' => true, 'S_ALL_UP_TO_DATE' => $all_up_to_date, - 'L_ALL_FILES_UP_TO_DATE' => $user->lang('ALL_FILES_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')), + 'L_ALL_FILES_UP_TO_DATE' => $user->lang('ALL_FILES_UP_TO_DATE', append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'), append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')), 'S_VERSION_UP_TO_DATE' => $up_to_date, 'U_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=file_check"), 'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"), @@ -1078,12 +1078,12 @@ class install_update extends module */ function show_diff(&$update_list) { - global $phpbb_root_path, $template, $user, $adm_relative_path; + global $phpbb_root_path, $template, $user, $phpbb_adm_relative_path; $this->tpl_name = 'install_update_diff'; // Got the diff template itself updated? If so, we are able to directly use it - if (in_array($adm_relative_path . 'style/install_update_diff.html', $this->update_info['files'])) + if (in_array($phpbb_adm_relative_path . 'style/install_update_diff.html', $this->update_info['files'])) { $this->tpl_name = '../../install/update/new/adm/style/install_update_diff'; } diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index e483915bd5..6b26a3f5d6 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -216,7 +216,7 @@ while ($row = $db->sql_fetchrow($result)) $location_url = append_sid("{$phpbb_root_path}index.$phpEx"); break; - case $adm_relative_path . 'index': + case $phpbb_adm_relative_path . 'index': $location = $user->lang['ACP']; $location_url = append_sid("{$phpbb_root_path}index.$phpEx"); break; |