1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11832] More extensive testing

PHPBB3-11832
This commit is contained in:
Nathan Guse
2013-09-10 11:15:24 -05:00
parent c46637990e
commit 3a4efa7959
2 changed files with 49 additions and 12 deletions

View File

@@ -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);
}
/**