mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge PR #1130 branch 'EXreaction/ticket/11259' into develop
* EXreaction/ticket/11259: [ticket/11259] htmlspecialchars($phpbb_admin_path) [ticket/11259] adm_relative_path -> phpbb_adm_relative_path [ticket/11259] Also make adm_relative_path available in the container [ticket/11259] Make phpbb_admin_path available everywhere Conflicts: phpBB/install/index.php phpBB/install/install_update.php
This commit is contained in:
commit
4dcc8cabae
19 changed files with 63 additions and 49 deletions
|
@ -42,7 +42,6 @@ if (!$auth->acl_get('a_'))
|
||||||
|
|
||||||
// We define the admin variables now, because the user is now able to use the admin related features...
|
// We define the admin variables now, because the user is now able to use the admin related features...
|
||||||
define('IN_ADMIN', true);
|
define('IN_ADMIN', true);
|
||||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
|
|
||||||
|
|
||||||
// Some oft used variables
|
// Some oft used variables
|
||||||
$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
|
$safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- IF META -->{META}<!-- ENDIF -->
|
<!-- IF META -->{META}<!-- ENDIF -->
|
||||||
<title>{PAGE_TITLE}</title>
|
<title>{PAGE_TITLE}</title>
|
||||||
|
|
||||||
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// <![CDATA[
|
// <![CDATA[
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- IF META -->{META}<!-- ENDIF -->
|
<!-- IF META -->{META}<!-- ENDIF -->
|
||||||
<title>{PAGE_TITLE}</title>
|
<title>{PAGE_TITLE}</title>
|
||||||
|
|
||||||
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// <![CDATA[
|
// <![CDATA[
|
||||||
|
|
|
@ -21,8 +21,6 @@ $user->session_begin(false);
|
||||||
$auth->acl($user->data);
|
$auth->acl($user->data);
|
||||||
$user->setup();
|
$user->setup();
|
||||||
|
|
||||||
$phpbb_admin_path = (defined('PHPBB_ADMIN_PATH')) ? PHPBB_ADMIN_PATH : './';
|
|
||||||
|
|
||||||
// Set custom template for admin area
|
// Set custom template for admin area
|
||||||
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,10 @@ if (!defined('PHPBB_INSTALLED'))
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
// Include files
|
||||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ class acp_ranks
|
||||||
|
|
||||||
'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '',
|
'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '',
|
||||||
'S_FILENAME_LIST' => $filename_list,
|
'S_FILENAME_LIST' => $filename_list,
|
||||||
'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
|
'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : htmlspecialchars($phpbb_admin_path) . 'images/spacer.gif',
|
||||||
'S_SPECIAL_RANK' => (isset($ranks['rank_special']) && $ranks['rank_special']) ? true : false,
|
'S_SPECIAL_RANK' => (isset($ranks['rank_special']) && $ranks['rank_special']) ? true : false,
|
||||||
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0)
|
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0)
|
||||||
);
|
);
|
||||||
|
|
|
@ -822,7 +822,7 @@ class phpbb_db_driver
|
||||||
*/
|
*/
|
||||||
function sql_report($mode, $query = '')
|
function sql_report($mode, $query = '')
|
||||||
{
|
{
|
||||||
global $cache, $starttime, $phpbb_root_path, $user;
|
global $cache, $starttime, $phpbb_root_path, $phpbb_admin_path, $user;
|
||||||
global $request;
|
global $request;
|
||||||
|
|
||||||
if (is_object($request) && !$request->variable('explain', false))
|
if (is_object($request) && !$request->variable('explain', false))
|
||||||
|
@ -852,7 +852,7 @@ class phpbb_db_driver
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>SQL Report</title>
|
<title>SQL Report</title>
|
||||||
<link href="' . $phpbb_root_path . 'adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
<link href="' . htmlspecialchars($phpbb_admin_path) . 'style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||||
</head>
|
</head>
|
||||||
<body id="errorpage">
|
<body id="errorpage">
|
||||||
<div id="wrap">
|
<div id="wrap">
|
||||||
|
|
|
@ -42,6 +42,7 @@ class phpbb_di_extension_config extends Extension
|
||||||
{
|
{
|
||||||
require($this->config_file);
|
require($this->config_file);
|
||||||
|
|
||||||
|
$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('core.table_prefix', $table_prefix);
|
||||||
$container->setParameter('cache.driver.class', $this->convert_30_acm_type($acm_type));
|
$container->setParameter('cache.driver.class', $this->convert_30_acm_type($acm_type));
|
||||||
$container->setParameter('dbal.driver.class', phpbb_convert_30_dbms_to_31($dbms));
|
$container->setParameter('dbal.driver.class', phpbb_convert_30_dbms_to_31($dbms));
|
||||||
|
|
|
@ -5339,7 +5339,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||||
function page_footer($run_cron = true, $display_template = true, $exit_handler = true)
|
function page_footer($run_cron = true, $display_template = true, $exit_handler = true)
|
||||||
{
|
{
|
||||||
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
|
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
|
||||||
global $request, $phpbb_dispatcher;
|
global $request, $phpbb_dispatcher, $phpbb_admin_path;
|
||||||
|
|
||||||
// A listener can set this variable to `true` when it overrides this function
|
// A listener can set this variable to `true` when it overrides this function
|
||||||
$page_footer_override = false;
|
$page_footer_override = false;
|
||||||
|
@ -5395,7 +5395,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
||||||
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
|
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
|
||||||
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group'),
|
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="https://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group'),
|
||||||
|
|
||||||
'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", false, true, $user->session_id) : '')
|
'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_admin_path}index.$phpEx", false, true, $user->session_id) : '')
|
||||||
);
|
);
|
||||||
|
|
||||||
// Call cron-type script
|
// Call cron-type script
|
||||||
|
|
|
@ -82,16 +82,16 @@ function adm_page_header($page_title)
|
||||||
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
|
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
|
||||||
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
|
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
|
||||||
|
|
||||||
'ICON_MOVE_UP' => '<img src="' . $phpbb_admin_path . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
'ICON_MOVE_UP' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_up.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||||
'ICON_MOVE_UP_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
'ICON_MOVE_UP_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_up_disabled.gif" alt="' . $user->lang['MOVE_UP'] . '" title="' . $user->lang['MOVE_UP'] . '" />',
|
||||||
'ICON_MOVE_DOWN' => '<img src="' . $phpbb_admin_path . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
'ICON_MOVE_DOWN' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_down.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||||
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
'ICON_MOVE_DOWN_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_down_disabled.gif" alt="' . $user->lang['MOVE_DOWN'] . '" title="' . $user->lang['MOVE_DOWN'] . '" />',
|
||||||
'ICON_EDIT' => '<img src="' . $phpbb_admin_path . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
'ICON_EDIT' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_edit.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||||
'ICON_EDIT_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
'ICON_EDIT_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_edit_disabled.gif" alt="' . $user->lang['EDIT'] . '" title="' . $user->lang['EDIT'] . '" />',
|
||||||
'ICON_DELETE' => '<img src="' . $phpbb_admin_path . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
'ICON_DELETE' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_delete.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||||
'ICON_DELETE_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
'ICON_DELETE_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_delete_disabled.gif" alt="' . $user->lang['DELETE'] . '" title="' . $user->lang['DELETE'] . '" />',
|
||||||
'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
'ICON_SYNC' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||||
'ICON_SYNC_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
'ICON_SYNC_DISABLED' => '<img src="' . htmlspecialchars($phpbb_admin_path) . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||||
|
|
||||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||||
|
|
|
@ -508,6 +508,9 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_test
|
||||||
'dbuser' => $data['dbuser'],
|
'dbuser' => $data['dbuser'],
|
||||||
'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
|
'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
|
||||||
'table_prefix' => $data['table_prefix'],
|
'table_prefix' => $data['table_prefix'],
|
||||||
|
|
||||||
|
'adm_relative_path' => 'adm/',
|
||||||
|
|
||||||
'acm_type' => 'phpbb_cache_driver_file',
|
'acm_type' => 'phpbb_cache_driver_file',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class ucp_groups
|
||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $phpbb_root_path, $phpEx;
|
global $config, $phpbb_root_path, $phpEx, $phpbb_admin_path;
|
||||||
global $db, $user, $auth, $cache, $template;
|
global $db, $user, $auth, $cache, $template;
|
||||||
global $request;
|
global $request;
|
||||||
|
|
||||||
|
@ -438,7 +438,7 @@ class ucp_groups
|
||||||
$group_name = $group_row['group_name'];
|
$group_name = $group_row['group_name'];
|
||||||
$group_type = $group_row['group_type'];
|
$group_type = $group_row['group_type'];
|
||||||
|
|
||||||
$avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : '<img src="' . $phpbb_root_path . 'adm/images/no_avatar.gif" alt="" />';
|
$avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : '<img src="' . $phpbb_admin_path . 'images/no_avatar.gif" alt="" />';
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name,
|
'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name,
|
||||||
|
@ -730,7 +730,7 @@ class ucp_groups
|
||||||
'GROUP_CLOSED' => $type_closed,
|
'GROUP_CLOSED' => $type_closed,
|
||||||
'GROUP_HIDDEN' => $type_hidden,
|
'GROUP_HIDDEN' => $type_hidden,
|
||||||
|
|
||||||
'U_SWATCH' => append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&name=group_colour'),
|
'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=ucp&name=group_colour'),
|
||||||
'S_UCP_ACTION' => $this->u_action . "&action=$action&g=$group_id",
|
'S_UCP_ACTION' => $this->u_action . "&action=$action&g=$group_id",
|
||||||
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
|
'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(),
|
||||||
));
|
));
|
||||||
|
|
|
@ -73,6 +73,10 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
|
||||||
die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update.");
|
die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
// Include files
|
||||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
||||||
|
|
||||||
|
@ -231,7 +235,7 @@ if ($has_global && !$ga_forum_id)
|
||||||
|
|
||||||
<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
|
<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
|
||||||
|
|
||||||
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
<link href="<?php echo htmlspecialchars($phpbb_admin_path); ?>style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -281,7 +285,7 @@ header('Content-type: text/html; charset=UTF-8');
|
||||||
|
|
||||||
<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
|
<title><?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?></title>
|
||||||
|
|
||||||
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
<link href="<?php echo htmlspecialchars($phpbb_admin_path); ?>style/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,10 @@ else
|
||||||
}
|
}
|
||||||
@ini_set('memory_limit', $mem_limit);
|
@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
|
// Include essential scripts
|
||||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
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());
|
$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 = 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_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_ASSETS_PATH', '../assets');
|
||||||
$template->assign_var('T_TEMPLATE_PATH', '../adm/style');
|
$template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style');
|
||||||
|
|
||||||
$install = new module();
|
$install = new module();
|
||||||
|
|
||||||
|
@ -361,7 +365,7 @@ class module
|
||||||
}
|
}
|
||||||
|
|
||||||
define('HEADER_INC', true);
|
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(
|
$template->assign_vars(array(
|
||||||
'L_CHANGE' => $lang['CHANGE'],
|
'L_CHANGE' => $lang['CHANGE'],
|
||||||
|
@ -370,7 +374,7 @@ class module
|
||||||
'L_SELECT_LANG' => $lang['SELECT_LANG'],
|
'L_SELECT_LANG' => $lang['SELECT_LANG'],
|
||||||
'L_SKIP' => $lang['SKIP'],
|
'L_SKIP' => $lang['SKIP'],
|
||||||
'PAGE_TITLE' => $this->get_page_title(),
|
'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_DIRECTION' => $lang['DIRECTION'],
|
||||||
'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
|
'S_CONTENT_FLOW_BEGIN' => ($lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
|
||||||
|
@ -551,7 +555,7 @@ class module
|
||||||
*/
|
*/
|
||||||
function error($error, $line, $file, $skip = false)
|
function error($error, $line, $file, $skip = false)
|
||||||
{
|
{
|
||||||
global $lang, $db, $template;
|
global $lang, $db, $template, $phpbb_admin_path;
|
||||||
|
|
||||||
if ($skip)
|
if ($skip)
|
||||||
{
|
{
|
||||||
|
@ -573,7 +577,7 @@ class module
|
||||||
echo '<head>';
|
echo '<head>';
|
||||||
echo '<meta charset="utf-8">';
|
echo '<meta charset="utf-8">';
|
||||||
echo '<title>' . $lang['INST_ERR_FATAL'] . '</title>';
|
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 '</head>';
|
||||||
echo '<body id="errorpage">';
|
echo '<body id="errorpage">';
|
||||||
echo '<div id="wrap">';
|
echo '<div id="wrap">';
|
||||||
|
|
|
@ -1807,7 +1807,7 @@ class install_install extends module
|
||||||
*/
|
*/
|
||||||
function email_admin($mode, $sub)
|
function email_admin($mode, $sub)
|
||||||
{
|
{
|
||||||
global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpEx;
|
global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||||
|
|
||||||
$this->page_title = $lang['STAGE_FINAL'];
|
$this->page_title = $lang['STAGE_FINAL'];
|
||||||
|
|
||||||
|
@ -1854,7 +1854,7 @@ class install_install extends module
|
||||||
'TITLE' => $lang['INSTALL_CONGRATS'],
|
'TITLE' => $lang['INSTALL_CONGRATS'],
|
||||||
'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'),
|
'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'),
|
||||||
'L_SUBMIT' => $lang['INSTALL_LOGIN'],
|
'L_SUBMIT' => $lang['INSTALL_LOGIN'],
|
||||||
'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&mode=send_statistics'),
|
'U_ACTION' => append_sid($phpbb_admin_path . 'index.' . $phpEx, 'i=send_statistics&mode=send_statistics'),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ class install_update extends module
|
||||||
function main($mode, $sub)
|
function main($mode, $sub)
|
||||||
{
|
{
|
||||||
global $phpbb_style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
|
global $phpbb_style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language;
|
||||||
global $request;
|
global $request, $phpbb_admin_path, $phpbb_adm_relative_path;
|
||||||
|
|
||||||
$this->tpl_name = 'install_update';
|
$this->tpl_name = 'install_update';
|
||||||
$this->page_title = 'UPDATE_INSTALLATION';
|
$this->page_title = 'UPDATE_INSTALLATION';
|
||||||
|
@ -132,7 +132,7 @@ class install_update extends module
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set custom template again. ;)
|
// Set custom template again. ;)
|
||||||
$phpbb_style->set_custom_style('admin', '../adm/style', array(), '');
|
$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', array(), '');
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||||
|
@ -217,7 +217,7 @@ class install_update extends module
|
||||||
if ($this->test_update === false)
|
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
|
// 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/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';
|
$this->tpl_name = '../../install/update/new/adm/style/install_update';
|
||||||
}
|
}
|
||||||
|
@ -494,6 +494,7 @@ class install_update extends module
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_FILE_CHECK' => true,
|
'S_FILE_CHECK' => true,
|
||||||
'S_ALL_UP_TO_DATE' => $all_up_to_date,
|
'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=' . $phpbb_adm_relative_path . 'index.php%3Fi=send_statistics%26mode=send_statistics')),
|
||||||
'S_VERSION_UP_TO_DATE' => $up_to_date,
|
'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_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"),
|
'U_UPDATE_ACTION' => append_sid($this->p_master->module_url, "language=$language&mode=$mode&sub=update_files"),
|
||||||
|
@ -1078,12 +1079,12 @@ class install_update extends module
|
||||||
*/
|
*/
|
||||||
function show_diff(&$update_list)
|
function show_diff(&$update_list)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $template, $user;
|
global $phpbb_root_path, $template, $user, $phpbb_adm_relative_path;
|
||||||
|
|
||||||
$this->tpl_name = 'install_update_diff';
|
$this->tpl_name = 'install_update_diff';
|
||||||
|
|
||||||
// Got the diff template itself updated? If so, we are able to directly use it
|
// Got the diff template itself updated? If so, we are able to directly use it
|
||||||
if (in_array('adm/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';
|
$this->tpl_name = '../../install/update/new/adm/style/install_update_diff';
|
||||||
}
|
}
|
||||||
|
|
|
@ -374,7 +374,7 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
// Updater
|
// Updater
|
||||||
$lang = array_merge($lang, array(
|
$lang = array_merge($lang, array(
|
||||||
'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="../ucp.php?mode=login&redirect=adm/index.php%3Fi=send_statistics%26mode=send_statistics">Send statistics</a> module in your ACP.',
|
'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="%1$s">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="%2$s">Send statistics</a> module in your ACP.',
|
||||||
'ARCHIVE_FILE' => 'Source file within archive',
|
'ARCHIVE_FILE' => 'Source file within archive',
|
||||||
|
|
||||||
'BACK' => 'Back',
|
'BACK' => 'Back',
|
||||||
|
|
|
@ -649,7 +649,7 @@ switch ($mode)
|
||||||
'S_GROUP_OPTIONS' => $group_options,
|
'S_GROUP_OPTIONS' => $group_options,
|
||||||
'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,
|
'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false,
|
||||||
|
|
||||||
'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '',
|
'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '',
|
||||||
'U_USER_BAN' => ($auth->acl_get('m_ban') && $user_id != $user->data['user_id']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=ban&mode=user&u=' . $user_id, true, $user->session_id) : '',
|
'U_USER_BAN' => ($auth->acl_get('m_ban') && $user_id != $user->data['user_id']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=ban&mode=user&u=' . $user_id, true, $user->session_id) : '',
|
||||||
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
|
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
|
||||||
|
|
||||||
|
|
|
@ -216,7 +216,7 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
|
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'adm/index':
|
case $phpbb_adm_relative_path . 'index':
|
||||||
$location = $user->lang['ACP'];
|
$location = $user->lang['ACP'];
|
||||||
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
|
$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue