aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-06-09 01:10:18 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-06-09 01:10:18 +0200
commit1a6d8dd94d916a7dddbfc6abca8cd4a2f1adf5b9 (patch)
treea94beec78c9671c1185e1b789a02c7411011c43c /phpBB/phpbb/path_helper.php
parent[ticket/12099] Deduplicate path generation (diff)
downloadphpbb-1a6d8dd94d916a7dddbfc6abca8cd4a2f1adf5b9.tar.gz
phpbb-1a6d8dd94d916a7dddbfc6abca8cd4a2f1adf5b9.tar.bz2
phpbb-1a6d8dd94d916a7dddbfc6abca8cd4a2f1adf5b9.zip
[ticket/12099] Prepend ./ to path to fix assets
PHPBB3-12099
Diffstat (limited to 'phpBB/phpbb/path_helper.php')
-rw-r--r--phpBB/phpbb/path_helper.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index e63aa06a57..685a5ec180 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -158,7 +158,7 @@ class path_helper
*/
if ($path_info === '/' && preg_match('/app\.' . $this->php_ext . '\/$/', $request_uri))
{
- return $this->web_root_path = $this->filesystem->clean_path('../' . $this->phpbb_root_path);
+ return $this->web_root_path = $this->filesystem->clean_path('./../' . $this->phpbb_root_path);
}
/*
@@ -184,7 +184,9 @@ class path_helper
}
// Prepend ../ to the phpbb_root_path as many times as / exists in path_info
- $this->web_root_path = $this->filesystem->clean_path(str_repeat('../', $corrections) . $this->phpbb_root_path);
+ $this->web_root_path = $this->filesystem->clean_path(
+ './' . str_repeat('../', $corrections) . $this->phpbb_root_path
+ );
return $this->web_root_path;
}