mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-20 07:21:30 +02:00
[ticket/11259] Make phpbb_admin_path available everywhere
PHPBB3-11259
This commit is contained in:
@@ -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">';
|
||||
|
Reference in New Issue
Block a user