aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-11-13 16:11:32 +0100
committerJoas Schilling <nickvergessen@gmx.de>2011-11-14 15:10:25 +0100
commit3302305cd4a499603784aa87a40f5170d62a4f26 (patch)
treedbba0380db1bb2ff3f8194608521ba28c336adc1 /phpBB/includes/functions.php
parent6370ef27057643ee7fe0a6fbf2341c2ebdb57d4c (diff)
downloadforums-3302305cd4a499603784aa87a40f5170d62a4f26.tar
forums-3302305cd4a499603784aa87a40f5170d62a4f26.tar.gz
forums-3302305cd4a499603784aa87a40f5170d62a4f26.tar.bz2
forums-3302305cd4a499603784aa87a40f5170d62a4f26.tar.xz
forums-3302305cd4a499603784aa87a40f5170d62a4f26.zip
[ticket/9066] Move regex into get_preg_expression function and add tests
PHPBB3-9066
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index c2b099d48a..e477b0454e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3486,6 +3486,10 @@ function get_preg_expression($mode)
$inline = ($mode == 'relative_url') ? ')' : '';
return "(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
break;
+
+ case 'table_prefix':
+ return '#^[a-zA-Z][a-zA-Z0-9_]*$#';
+ break;
}
return '';