aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions.php5
-rw-r--r--phpBB/phpbb/controller/helper.php2
2 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index a61518401c..9e1e1cae0e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3317,6 +3317,11 @@ function get_preg_expression($mode)
case 'table_prefix':
return '#^[a-zA-Z][a-zA-Z0-9_]*$#';
break;
+
+ // Matches the predecing dot
+ case 'path_remove_dot_trailing_slash':
+ return '#^(?:(\.)?)+(?:(.+)?)+(?:([\\/\\\])$)#';
+ break;
}
return '';
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);