mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/13276] Support PHPBB_USE_BOARD_URL_PATH in web root path
PHPBB3-13276
This commit is contained in:
@@ -3695,15 +3695,11 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
|
||||
{
|
||||
if ($lazy)
|
||||
{
|
||||
// Determine board url - we may need it later
|
||||
$board_url = generate_board_url() . '/';
|
||||
// This path is sent with the base template paths in the assign_vars()
|
||||
// call below. We need to correct it in case we are accessing from a
|
||||
// controller because the web paths will be incorrect otherwise.
|
||||
$phpbb_path_helper = $phpbb_container->get('path_helper');
|
||||
$corrected_path = $phpbb_path_helper->get_web_root_path();
|
||||
|
||||
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $corrected_path;
|
||||
$web_path = $phpbb_path_helper->get_web_root_path();
|
||||
|
||||
$theme = "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme';
|
||||
|
||||
@@ -3891,15 +3887,12 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// Determine board url - we may need it later
|
||||
$board_url = generate_board_url() . '/';
|
||||
// This path is sent with the base template paths in the assign_vars()
|
||||
// call below. We need to correct it in case we are accessing from a
|
||||
// controller because the web paths will be incorrect otherwise.
|
||||
/* @var $phpbb_path_helper \phpbb\path_helper */
|
||||
$phpbb_path_helper = $phpbb_container->get('path_helper');
|
||||
$corrected_path = $phpbb_path_helper->get_web_root_path();
|
||||
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $corrected_path;
|
||||
$web_path = $phpbb_path_helper->get_web_root_path();
|
||||
|
||||
// Send a proper content-language to the output
|
||||
$user_lang = $user->lang['USER_LANG'];
|
||||
@@ -4002,7 +3995,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
'_SID' => $_SID,
|
||||
'SESSION_ID' => $user->session_id,
|
||||
'ROOT_PATH' => $web_path,
|
||||
'BOARD_URL' => $board_url,
|
||||
'BOARD_URL' => generate_board_url() . '/',
|
||||
|
||||
'L_LOGIN_LOGOUT' => $l_login_logout,
|
||||
'L_INDEX' => ($config['board_index_text'] !== '') ? $config['board_index_text'] : $user->lang['FORUM_INDEX'],
|
||||
|
@@ -1088,7 +1088,7 @@ function smiley_text($text, $force_option = false)
|
||||
}
|
||||
else
|
||||
{
|
||||
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
|
||||
$root_path = $phpbb_path_helper->get_web_root_path();
|
||||
|
||||
/**
|
||||
* Event to override the root_path for smilies
|
||||
|
@@ -189,7 +189,7 @@ function generate_smilies($mode, $forum_id)
|
||||
|
||||
if (count($smilies))
|
||||
{
|
||||
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
|
||||
$root_path = $phpbb_path_helper->get_web_root_path();
|
||||
|
||||
foreach ($smilies as $row)
|
||||
{
|
||||
@@ -420,7 +420,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
*/
|
||||
function posting_gen_topic_icons($mode, $icon_id)
|
||||
{
|
||||
global $phpbb_root_path, $config, $template, $cache;
|
||||
global $phpbb_root_path, $phpbb_path_helper, $config, $template, $cache;
|
||||
|
||||
// Grab icons
|
||||
$icons = $cache->obtain_icons();
|
||||
@@ -432,7 +432,7 @@ function posting_gen_topic_icons($mode, $icon_id)
|
||||
|
||||
if (count($icons))
|
||||
{
|
||||
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
|
||||
$root_path = $phpbb_path_helper->get_web_root_path();
|
||||
|
||||
foreach ($icons as $id => $data)
|
||||
{
|
||||
|
Reference in New Issue
Block a user