mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/15253] Update imports
PHPBB3-15253
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
|
||||
namespace phpbb;
|
||||
|
||||
use phpbb\filesystem\helper as filesystem_helper;
|
||||
|
||||
/**
|
||||
* Session class
|
||||
*/
|
||||
@@ -85,15 +87,15 @@ class session
|
||||
$page_name = (substr($script_name, -1, 1) == '/') ? '' : basename($script_name);
|
||||
$page_name = urlencode(htmlspecialchars($page_name));
|
||||
|
||||
$symfony_request_path = \phpbb\filesystem\helper::clean_path($symfony_request->getPathInfo());
|
||||
$symfony_request_path = filesystem_helper::clean_path($symfony_request->getPathInfo());
|
||||
if ($symfony_request_path !== '/')
|
||||
{
|
||||
$page_name .= str_replace('%2F', '/', urlencode($symfony_request_path));
|
||||
}
|
||||
|
||||
// current directory within the phpBB root (for example: adm)
|
||||
$root_dirs = explode('/', str_replace('\\', '/', \phpbb\filesystem\helper::realpath($root_path)));
|
||||
$page_dirs = explode('/', str_replace('\\', '/', \phpbb\filesystem\helper::realpath('./')));
|
||||
$root_dirs = explode('/', str_replace('\\', '/', filesystem_helper::realpath($root_path)));
|
||||
$page_dirs = explode('/', str_replace('\\', '/', filesystem_helper::realpath('./')));
|
||||
$intersection = array_intersect_assoc($root_dirs, $page_dirs);
|
||||
|
||||
$root_dirs = array_diff_assoc($root_dirs, $intersection);
|
||||
|
Reference in New Issue
Block a user