diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-09-10 11:15:24 -0500 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-09-10 11:15:24 -0500 |
commit | 3a4efa79592616ac099e95d07e9aed52bc5a19a3 (patch) | |
tree | 5624e608cf442471a01445ed10a66a26a6fced04 /phpBB/phpbb/filesystem.php | |
parent | c46637990e5937881f98d9711783fe9982532884 (diff) | |
download | forums-3a4efa79592616ac099e95d07e9aed52bc5a19a3.tar forums-3a4efa79592616ac099e95d07e9aed52bc5a19a3.tar.gz forums-3a4efa79592616ac099e95d07e9aed52bc5a19a3.tar.bz2 forums-3a4efa79592616ac099e95d07e9aed52bc5a19a3.tar.xz forums-3a4efa79592616ac099e95d07e9aed52bc5a19a3.zip |
[ticket/11832] More extensive testing
PHPBB3-11832
Diffstat (limited to 'phpBB/phpbb/filesystem.php')
-rw-r--r-- | phpBB/phpbb/filesystem.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/phpbb/filesystem.php b/phpBB/phpbb/filesystem.php index e8fd03d103..6c037b2656 100644 --- a/phpBB/phpbb/filesystem.php +++ b/phpBB/phpbb/filesystem.php @@ -26,6 +26,9 @@ class phpbb_filesystem /** @var string */ protected $phpbb_root_path; + /** @var string */ + protected $web_root_path; + /** * Constructor * @@ -82,16 +85,15 @@ class phpbb_filesystem return $this->phpbb_root_path; } - static $path; - if (null !== $path) + if (null !== $this->web_root_path) { - return $path; + return $this->web_root_path; } $path_info = $symfony_request->getPathInfo(); if ($path_info === '/') { - return $path = $this->phpbb_root_path; + return $this->web_root_path = $this->phpbb_root_path; } $path_info = $this->clean_path($path_info); @@ -106,7 +108,7 @@ class phpbb_filesystem $corrections -= 1; } - return $path = $this->phpbb_root_path . str_repeat('../', $corrections); + return $this->web_root_path = $this->phpbb_root_path . str_repeat('../', $corrections); } /** |