aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-10-10 15:54:58 -0700
committerNils Adermann <naderman@naderman.de>2013-10-10 15:54:58 -0700
commit446dc9b47e51bc38a6593ff399a1ba155a6b5b49 (patch)
tree67314deea5bc506b1daabdca5ea23099f2e3b2fe /phpBB/phpbb
parent0b56390e320fbad7d3873b5e7db35af958e89386 (diff)
parentac9225774ecd93cbc717b99902c9cc94c7d8372e (diff)
downloadforums-446dc9b47e51bc38a6593ff399a1ba155a6b5b49.tar
forums-446dc9b47e51bc38a6593ff399a1ba155a6b5b49.tar.gz
forums-446dc9b47e51bc38a6593ff399a1ba155a6b5b49.tar.bz2
forums-446dc9b47e51bc38a6593ff399a1ba155a6b5b49.tar.xz
forums-446dc9b47e51bc38a6593ff399a1ba155a6b5b49.zip
Merge pull request #1764 from EXreaction/ticket/11874
[ticket/11874] Do not always prepend the web path; only replace phpbb_root_path
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/path_helper.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index b2ed11a927..e9fd092b62 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -89,26 +89,24 @@ class path_helper
}
/**
- * Update a path to the correct relative root path
+ * Update a web path to the correct relative root path
*
* This replaces $phpbb_root_path . some_url with
- * get_web_root_path() . some_url OR if $phpbb_root_path
- * is not at the beginning of $path, just prepends the
- * web root path
+ * get_web_root_path() . some_url
*
* @param string $path The path to be updated
* @return string
*/
public function update_web_root_path($path)
{
- $web_root_path = $this->get_web_root_path($this->symfony_request);
-
if (strpos($path, $this->phpbb_root_path) === 0)
{
$path = substr($path, strlen($this->phpbb_root_path));
+
+ return $this->get_web_root_path() . $path;
}
- return $web_root_path . $path;
+ return $path;
}
/**