From 1a6d8dd94d916a7dddbfc6abca8cd4a2f1adf5b9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 9 Jun 2014 01:10:18 +0200 Subject: [PATCH] [ticket/12099] Prepend ./ to path to fix assets PHPBB3-12099 --- phpBB/phpbb/path_helper.php | 6 ++++-- 1 file 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; }