From 6fd54436ee4568cd2e70d08063a816e3ce1ff4bc Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 19 Sep 2014 13:50:56 +0200 Subject: [ticket/13073] Add path regex to get_preg_expression() and add unit tests We're now calling get_preg_expression() instead of hardcoding the regex into the helper route method. PHPBB3-13073 --- phpBB/phpbb/controller/helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/controller') diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index 6c78868dbb..fc19b855c0 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -147,7 +147,7 @@ class helper } else { - $base_url .= preg_replace('#^(?:(\.))+(?:(.+)?)+(?:([\\/\\\])$)#', '$2', $this->phpbb_root_path); + $base_url .= preg_replace(get_preg_expression('path_remove_dot_trailing_slash'), '$2', $this->phpbb_root_path); } $base_url = $this->filesystem->clean_path($base_url); -- cgit v1.2.1