aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-09-19 13:50:56 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-09-19 13:54:15 +0200
commit6fd54436ee4568cd2e70d08063a816e3ce1ff4bc (patch)
treebd84f2e4e444ab0e2e2e7957a9c7a2cfb3d5625a /phpBB/includes/functions.php
parent4186ced4791cd8ea6c105d462f361be15eaff218 (diff)
downloadforums-6fd54436ee4568cd2e70d08063a816e3ce1ff4bc.tar
forums-6fd54436ee4568cd2e70d08063a816e3ce1ff4bc.tar.gz
forums-6fd54436ee4568cd2e70d08063a816e3ce1ff4bc.tar.bz2
forums-6fd54436ee4568cd2e70d08063a816e3ce1ff4bc.tar.xz
forums-6fd54436ee4568cd2e70d08063a816e3ce1ff4bc.zip
[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
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php5
1 files changed, 5 insertions, 0 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 '';