mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 11:28:55 +00:00
[ticket/11832] Use $phpbb_filesystem instead of the container in append_sid
PHPBB3-11832
This commit is contained in:
parent
d5f93f5ce4
commit
3684d8e971
2 changed files with 9 additions and 5 deletions
|
@ -2409,7 +2409,7 @@ function phpbb_on_page($template, $user, $base_url, $num_items, $per_page, $star
|
||||||
*/
|
*/
|
||||||
function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
||||||
{
|
{
|
||||||
global $_SID, $_EXTRA_URL, $phpbb_hook;
|
global $_SID, $_EXTRA_URL, $phpbb_hook, $phpbb_filesystem;
|
||||||
global $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
global $symfony_request, $phpbb_root_path, $phpbb_container;
|
global $symfony_request, $phpbb_root_path, $phpbb_container;
|
||||||
|
|
||||||
|
@ -2420,8 +2420,10 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the root path with the correct relative web path
|
// Update the root path with the correct relative web path
|
||||||
$phpbb_filesystem = $phpbb_container->get('filesystem');
|
if ($phpbb_filesystem instanceof phpbb_filesystem)
|
||||||
$url = $phpbb_filesystem->update_web_root_path($url, $symfony_request);
|
{
|
||||||
|
$url = $phpbb_filesystem->update_web_root_path($url, $symfony_request);
|
||||||
|
}
|
||||||
|
|
||||||
$append_sid_overwrite = false;
|
$append_sid_overwrite = false;
|
||||||
|
|
||||||
|
@ -5719,6 +5721,6 @@ function phpbb_create_symfony_request(phpbb_request $request)
|
||||||
array_walk_recursive($get_parameters, $sanitizer);
|
array_walk_recursive($get_parameters, $sanitizer);
|
||||||
array_walk_recursive($post_parameters, $sanitizer);
|
array_walk_recursive($post_parameters, $sanitizer);
|
||||||
|
|
||||||
$symfony_request = new Request($get_parameters, $post_parameters, array(), $cookie_parameters, $files_parameters, $server_parameters);
|
$symfony_request = new Symfony\Component\HttpFoundation\Request($get_parameters, $post_parameters, array(), $cookie_parameters, $files_parameters, $server_parameters);
|
||||||
return $symfony_request;
|
return $symfony_request;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,9 @@ class phpbb_filesystem_web_root_path_test extends phpbb_test_case
|
||||||
|
|
||||||
$this->set_phpbb_root_path();
|
$this->set_phpbb_root_path();
|
||||||
|
|
||||||
$this->filesystem = new phpbb_filesystem($this->phpbb_root_path);
|
global $phpbb_filesystem;
|
||||||
|
|
||||||
|
$phpbb_filesystem = $this->filesystem = new phpbb_filesystem($this->phpbb_root_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue