aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2011-09-26 20:52:07 +0100
committerChris Smith <toonarmy@phpbb.com>2011-09-26 20:52:07 +0100
commit0f589d9ce43272153c3b7bd300d1a15fabb87cdd (patch)
tree05d626c5f0fafc16b097cd3b33cca4c8b341da8d /phpBB/includes
parent5e768036f773e461283d0f65841d2ff0618ec7b7 (diff)
downloadforums-0f589d9ce43272153c3b7bd300d1a15fabb87cdd.tar
forums-0f589d9ce43272153c3b7bd300d1a15fabb87cdd.tar.gz
forums-0f589d9ce43272153c3b7bd300d1a15fabb87cdd.tar.bz2
forums-0f589d9ce43272153c3b7bd300d1a15fabb87cdd.tar.xz
forums-0f589d9ce43272153c3b7bd300d1a15fabb87cdd.zip
[ticket/10392] Fix access to nested special block variables.
PHPBB3-10392
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/template/filter.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/includes/template/filter.php b/phpBB/includes/template/filter.php
index f24c3f4d09..1c8b45307c 100644
--- a/phpBB/includes/template/filter.php
+++ b/phpBB/includes/template/filter.php
@@ -871,6 +871,8 @@ 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;
$expr = true;
@@ -880,19 +882,19 @@ class phpbb_template_filter extends php_user_filter
{
case 'S_ROW_NUM':
case 'S_ROW_COUNT':
- $varref = "\$_${namespace}_i";
+ $varref = "\$_${local_namespace}_i";
break;
case 'S_NUM_ROWS':
- $varref = "\$_${namespace}_count";
+ $varref = "\$_${local_namespace}_count";
break;
case 'S_FIRST_ROW':
- $varref = "(\$_${namespace}_i == 0)";
+ $varref = "(\$_${local_namespace}_i == 0)";
break;
case 'S_LAST_ROW':
- $varref = "(\$_${namespace}_i == \$_${namespace}_count - 1)";
+ $varref = "(\$_${local_namespace}_i == \$_${local_namespace}_count - 1)";
break;
case 'S_BLOCK_NAME':