From 4186ced4791cd8ea6c105d462f361be15eaff218 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 19 Sep 2014 12:14:57 +0200 Subject: [PATCH] [ticket/13073] Use just one regex in helper route() PHPBB3-13073 --- phpBB/phpbb/controller/helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index 4b93cd505a..6c78868dbb 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -147,7 +147,7 @@ class helper } else { - $base_url .= preg_replace('#[\\/\\\]$#', '', preg_replace('#^\.#', '', $this->phpbb_root_path)); + $base_url .= preg_replace('#^(?:(\.))+(?:(.+)?)+(?:([\\/\\\])$)#', '$2', $this->phpbb_root_path); } $base_url = $this->filesystem->clean_path($base_url);