From 719763dec21c431b41adb8855f6fc4cd007b418b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 19 Oct 2005 17:57:14 +0000 Subject: [PATCH] allow checking for loops with IF .block_var git-svn-id: file:///svn/phpbb/trunk@5271 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/template.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 64994cb3cf..986c5641d3 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -821,6 +821,11 @@ class template { $token = (!empty($varrefs[1])) ? $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[3]) . '[\'' . $varrefs[4] . '\']' : (($varrefs[3]) ? '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $varrefs[4] . '\']' : '$this->_tpldata[\'.\'][0][\'' . $varrefs[4] . '\']'); } + else if (preg_match('#^\.((([a-z0-9\-_]+)?\.?)+?)$#s', $token, $varrefs)) + { + $token = 'sizeof(' . $this->generate_block_data_ref($varrefs[1], false) . ')'; + } + break; } }