aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-02-11 23:40:18 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-02-11 23:40:18 +0100
commit971fe13a2893bf9ff550d2ae60de9613d56dda62 (patch)
tree9e29883c4c61c7cf47048048abbc6637a646fe09 /phpBB
parentc9e5d308f2ebaae5ddaa70faf25af93fe2eb368b (diff)
parent5557760eccab67515990622471bd5de297e40f1e (diff)
downloadforums-971fe13a2893bf9ff550d2ae60de9613d56dda62.tar
forums-971fe13a2893bf9ff550d2ae60de9613d56dda62.tar.gz
forums-971fe13a2893bf9ff550d2ae60de9613d56dda62.tar.bz2
forums-971fe13a2893bf9ff550d2ae60de9613d56dda62.tar.xz
forums-971fe13a2893bf9ff550d2ae60de9613d56dda62.zip
Merge pull request #4160 from Nicofuma/ticket/14440
[ticket/14440] Correctly remove the web root path in update_web_root_path
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/phpbb/path_helper.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index 7b0d6f0fba..154361ef64 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -100,11 +100,18 @@ class path_helper
*/
public function update_web_root_path($path)
{
+ $web_root_path = $this->get_web_root_path();
+
+ // Removes the web root path if it is already present
+ 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);