aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-11-13 07:34:40 -0800
committerMarc Alexander <admin@m-a-styles.de>2013-11-13 07:34:40 -0800
commit27ae58713b8468ce7dce19ea4dda60f924467fc0 (patch)
tree564bb46bed42f8e537d13f02049ded1bfde2b573 /phpBB/phpbb
parentd43542a434c6a214c7533f76f3b1dc7afe84e5cf (diff)
parenta0fca0acc24684615d123d71ce696e43ba4e2615 (diff)
downloadforums-27ae58713b8468ce7dce19ea4dda60f924467fc0.tar
forums-27ae58713b8468ce7dce19ea4dda60f924467fc0.tar.gz
forums-27ae58713b8468ce7dce19ea4dda60f924467fc0.tar.bz2
forums-27ae58713b8468ce7dce19ea4dda60f924467fc0.tar.xz
forums-27ae58713b8468ce7dce19ea4dda60f924467fc0.zip
Merge pull request #4 from nickvergessen/ticket/marc/11997
Ticket/marc/11997
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/path_helper.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index 8cd8808261..71252ac05b 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -102,6 +102,27 @@ class path_helper
}
/**
+ * Strips away the web root path and prepends the normal root path
+ *
+ * This replaces get_web_root_path() . some_url with
+ * $phpbb_root_path . some_url
+ *
+ * @param string $path The path to be updated
+ * @return string
+ */
+ public function remove_web_root_path($path)
+ {
+ if (strpos($path, $this->get_web_root_path()) === 0)
+ {
+ $path = substr($path, strlen($this->get_web_root_path()));
+
+ return $this->phpbb_root_path . $path;
+ }
+
+ return $path;
+ }
+
+ /**
* Get a relative root path from the current URL
*
* @return string