From 1f140130930e40dcf3e6693feb1b53d14e46d098 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 27 Sep 2011 01:06:43 +0100 Subject: [PATCH] [ticket/10392] Alter parent namespace stripping. PHPBB3-10392 --- phpBB/includes/template/filter.php | 11 +++++++++-- 1 file 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;