aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-04 00:23:42 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-04 00:27:12 +0100
commit7ec6dd75f388bf449016d78e39c93d3c13f99e69 (patch)
tree046204a108cc59ebd8e741fe9ca68647625726ce /phpBB
parent03fba990747bb0eeda47c8247b5808257d1443b7 (diff)
downloadforums-7ec6dd75f388bf449016d78e39c93d3c13f99e69.tar
forums-7ec6dd75f388bf449016d78e39c93d3c13f99e69.tar.gz
forums-7ec6dd75f388bf449016d78e39c93d3c13f99e69.tar.bz2
forums-7ec6dd75f388bf449016d78e39c93d3c13f99e69.tar.xz
forums-7ec6dd75f388bf449016d78e39c93d3c13f99e69.zip
[ticket/14440] Correctly remove the web root path in update_web_root_path
PHPBB3-14440
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/path_helper.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index 7b0d6f0fba..c5e006120a 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -100,11 +100,17 @@ class path_helper
*/
public function update_web_root_path($path)
{
+ $web_root_path = $this->get_web_root_path();
+
+ if (strpos($path, $web_root_path) === 0)
+ {
+ $path = $this->phpbb_root_path . substr($path, strlen($web_root_path));
+ }
+
if (strpos($path, $this->phpbb_root_path) === 0)
{
$path = substr($path, strlen($this->phpbb_root_path));
- $web_root_path = $this->get_web_root_path();
if (substr($web_root_path, -8) === 'app.php/' && substr($path, 0, 7) === 'app.php')
{
$path = substr($path, 8);