aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2011-09-27 01:06:43 +0100
committerChris Smith <toonarmy@phpbb.com>2011-09-27 01:06:43 +0100
commit1f140130930e40dcf3e6693feb1b53d14e46d098 (patch)
tree72b56ee01d74483a507722ca36be012b2e7e96e5 /phpBB/includes/template
parent118bc6198e87ffd21835d2477039744e23b04cb7 (diff)
downloadforums-1f140130930e40dcf3e6693feb1b53d14e46d098.tar
forums-1f140130930e40dcf3e6693feb1b53d14e46d098.tar.gz
forums-1f140130930e40dcf3e6693feb1b53d14e46d098.tar.bz2
forums-1f140130930e40dcf3e6693feb1b53d14e46d098.tar.xz
forums-1f140130930e40dcf3e6693feb1b53d14e46d098.zip
[ticket/10392] Alter parent namespace stripping.
PHPBB3-10392
Diffstat (limited to 'phpBB/includes/template')
-rw-r--r--phpBB/includes/template/filter.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/includes/template/filter.php b/phpBB/includes/template/filter.php
index b6b9a2963e..da2cffe64f 100644
--- a/phpBB/includes/template/filter.php
+++ b/phpBB/includes/template/filter.php
@@ -871,8 +871,15 @@ class phpbb_template_filter extends php_user_filter
{
// Strip the trailing period.
$namespace = substr($namespace, 0, -1);
- $local_namespace = substr(strrchr($namespace, '.'), 1);
- $local_namespace = ($local_namespace) ? $local_namespace : $namespace;
+
+ if (($pos = strrpos($namespace, '.')) !== false)
+ {
+ $local_namespace = substr($namespace, $pos + 1);
+ }
+ else
+ {
+ $local_namespace = $namespace;
+ }
$expr = true;