1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-07 01:06:48 +02:00

[ticket/15253] Move storage helper to filesystem

PHPBB3-15253
This commit is contained in:
Rubén Calvo
2017-06-27 10:27:32 +02:00
parent 8dbbf74550
commit 603a8c51da
24 changed files with 43 additions and 607 deletions

View File

@@ -85,15 +85,15 @@ class session
$page_name = (substr($script_name, -1, 1) == '/') ? '' : basename($script_name);
$page_name = urlencode(htmlspecialchars($page_name));
$symfony_request_path = \phpbb\storage\helper::clean_path($symfony_request->getPathInfo());
$symfony_request_path = \phpbb\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\storage\helper::realpath($root_path)));
$page_dirs = explode('/', str_replace('\\', '/', \phpbb\storage\helper::realpath('./')));
$root_dirs = explode('/', str_replace('\\', '/', \phpbb\filesystem\helper::realpath($root_path)));
$page_dirs = explode('/', str_replace('\\', '/', \phpbb\filesystem\helper::realpath('./')));
$intersection = array_intersect_assoc($root_dirs, $page_dirs);
$root_dirs = array_diff_assoc($root_dirs, $intersection);