aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-07-05 14:01:14 +0200
committerTristan Darricau <github@nicofuma.fr>2014-07-05 14:01:14 +0200
commit7399f29df8f764ff8096620a8f11afae0decc215 (patch)
treef082659034214b60e9a57971747f204b8a54690f
parentbc47e719b1c10ba43b7da0062f8236a8d137a159 (diff)
downloadforums-7399f29df8f764ff8096620a8f11afae0decc215.tar
forums-7399f29df8f764ff8096620a8f11afae0decc215.tar.gz
forums-7399f29df8f764ff8096620a8f11afae0decc215.tar.bz2
forums-7399f29df8f764ff8096620a8f11afae0decc215.tar.xz
forums-7399f29df8f764ff8096620a8f11afae0decc215.zip
[ticket/12787] Remove one app.php when it's both in $path and $web_root_path
PHPBB3-12787
-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 8b2c31b478..a8592eac6c 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -104,7 +104,13 @@ class path_helper
{
$path = substr($path, strlen($this->phpbb_root_path));
- return $this->filesystem->clean_path($this->get_web_root_path() . $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);
+ }
+
+ return $this->filesystem->clean_path($web_root_path . $path);
}
return $path;