1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 20:40:24 +02:00

[ticket/11508] Use $phpbb_path_helper.

PHPBB3-11508
This commit is contained in:
Cesar G
2014-04-22 12:40:28 -07:00
parent e287eea2c6
commit c2ac76e8b1
2 changed files with 6 additions and 8 deletions

View File

@@ -2344,10 +2344,9 @@ function reapply_sid($url)
*/
function build_url($strip_vars = false)
{
global $config, $user, $phpbb_container;
global $config, $user, $phpbb_path_helper;
$path_helper = $phpbb_container->get('path_helper');
$php_ext = $path_helper->get_php_ext();
$php_ext = $phpbb_path_helper->get_php_ext();
$page = $user->page['page'];
// We need to be cautious here.
@@ -2365,7 +2364,7 @@ function build_url($strip_vars = false)
$page = substr($page, strlen('app.' . $php_ext . '/'));
}
$page = $path_helper->get_phpbb_root_path() . $page;
$page = $phpbb_path_helper->get_phpbb_root_path() . $page;
}
// Append SID
@@ -2373,7 +2372,7 @@ function build_url($strip_vars = false)
if ($strip_vars !== false)
{
$redirect = $path_helper->strip_url_params($redirect, $strip_vars, false);
$redirect = $phpbb_path_helper->strip_url_params($redirect, $strip_vars, false);
}
return $redirect . ((strpos($redirect, '?') === false) ? '?' : '');