aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/index.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-12-09 17:01:08 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-12-09 17:01:08 -0600
commit6dee2539419ba2c050830b7677294603a63b559a (patch)
tree4981e8a9d0cd2e4ecaf22f1907242397719d2cd6 /phpBB/install/index.php
parentbd987b6e14ffc134f1c1972e3c0fb3b0a19e09b2 (diff)
downloadforums-6dee2539419ba2c050830b7677294603a63b559a.tar
forums-6dee2539419ba2c050830b7677294603a63b559a.tar.gz
forums-6dee2539419ba2c050830b7677294603a63b559a.tar.bz2
forums-6dee2539419ba2c050830b7677294603a63b559a.tar.xz
forums-6dee2539419ba2c050830b7677294603a63b559a.zip
[ticket/11259] Make phpbb_admin_path available everywhere
PHPBB3-11259
Diffstat (limited to 'phpBB/install/index.php')
-rw-r--r--phpBB/install/index.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 09560946a6..22dc12fe99 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -73,6 +73,10 @@ 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;
+
// Include essential scripts
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
@@ -215,9 +219,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', '');
+$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', '');
$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 +365,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 +374,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' => $phpbb_admin_path . 'images/',
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
@@ -551,7 +555,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 +577,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="' . $phpbb_admin_path . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />';
echo '</head>';
echo '<body id="errorpage">';
echo '<div id="wrap">';