diff options
Diffstat (limited to 'phpBB/install/index.php')
-rw-r--r-- | phpBB/install/index.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 2be5adaaac..a03fda6395 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -73,6 +73,10 @@ else } @ini_set('memory_limit', $mem_limit); +// 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); @@ -97,9 +101,6 @@ $phpbb_container = phpbb_create_install_container($phpbb_root_path, $phpEx); $phpbb_class_loader->set_cache($phpbb_container->get('cache.driver')); $phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver')); -// set up caching -$cache = $phpbb_container->get('cache'); - $phpbb_dispatcher = $phpbb_container->get('dispatcher'); $request = $phpbb_container->get('request'); @@ -195,7 +196,8 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx)) require($phpbb_root_path . 'includes/hooks/index.' . $phpEx); $phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display'))); - foreach ($cache->obtain_hooks() as $hook) + $phpbb_hook_finder = $phpbb_container->get('hook_finder'); + foreach ($phpbb_hook_finder->find() as $hook) { @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx); } @@ -215,9 +217,9 @@ $phpbb_style_path_provider = new phpbb_style_path_provider(); $template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, new phpbb_template_context()); $phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); $phpbb_style->set_ext_dir_prefix('adm/'); -$phpbb_style->set_custom_style('admin', '../adm/style', array(), ''); +$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), ''); $template->assign_var('T_ASSETS_PATH', '../assets'); -$template->assign_var('T_TEMPLATE_PATH', '../adm/style'); +$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); $install = new module(); @@ -361,7 +363,7 @@ class module } define('HEADER_INC', true); - global $template, $lang, $stage, $phpbb_root_path; + global $template, $lang, $stage, $phpbb_root_path, $phpbb_admin_path; $template->assign_vars(array( 'L_CHANGE' => $lang['CHANGE'], @@ -370,7 +372,7 @@ class module 'L_SELECT_LANG' => $lang['SELECT_LANG'], 'L_SKIP' => $lang['SKIP'], 'PAGE_TITLE' => $this->get_page_title(), - 'T_IMAGE_PATH' => $phpbb_root_path . 'adm/images/', + 'T_IMAGE_PATH' => htmlspecialchars($phpbb_admin_path) . 'images/', 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], 'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right', @@ -551,7 +553,7 @@ class module */ function error($error, $line, $file, $skip = false) { - global $lang, $db, $template; + global $lang, $db, $template, $phpbb_admin_path; if ($skip) { @@ -573,7 +575,7 @@ class module echo '<head>'; echo '<meta charset="utf-8">'; echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>'; - echo '<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />'; + echo '<link href="' . htmlspecialchars($phpbb_admin_path) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />'; echo '</head>'; echo '<body id="errorpage">'; echo '<div id="wrap">'; |