diff options
author | David M <davidmj@users.sourceforge.net> | 2006-12-26 13:56:50 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-12-26 13:56:50 +0000 |
commit | 1d8e391d195fd61ce363bbfa18a1bec7257186b4 (patch) | |
tree | d758cc1f930dcdae355f89b5892ddb2a2e624d48 /phpBB/includes/functions_template.php | |
parent | 5225e5da5cf3d78f670aa5866633860a63dc50b5 (diff) | |
download | forums-1d8e391d195fd61ce363bbfa18a1bec7257186b4.tar forums-1d8e391d195fd61ce363bbfa18a1bec7257186b4.tar.gz forums-1d8e391d195fd61ce363bbfa18a1bec7257186b4.tar.bz2 forums-1d8e391d195fd61ce363bbfa18a1bec7257186b4.tar.xz forums-1d8e391d195fd61ce363bbfa18a1bec7257186b4.zip |
#6596
git-svn-id: file:///svn/phpbb/trunk@6812 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_template.php')
-rw-r--r-- | phpBB/includes/functions_template.php | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/phpBB/includes/functions_template.php b/phpBB/includes/functions_template.php index 04150d0420..2bbd812678 100644 --- a/phpBB/includes/functions_template.php +++ b/phpBB/includes/functions_template.php @@ -315,7 +315,17 @@ class template_compile $tag_template_php = ''; array_push($this->block_names, $tag_args); - if (sizeof($this->block_names) < 2) + if ($no_nesting !== false) + { + // We need to implode $no_nesting times from the end... + $block = array_slice($this->block_names, -$no_nesting); + } + else + { + $block = $this->block_names; + } + + if (sizeof($block) < 2) { // Block is not nested. $tag_template_php = '$_' . $tag_args . "_count = (isset(\$this->_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;"; @@ -324,17 +334,8 @@ class template_compile else { // This block is nested. - // Generate a namespace string for this block. - if ($no_nesting !== false) - { - // We need to implode $no_nesting times from the end... - $namespace = implode('.', array_slice($this->block_names, -$no_nesting)); - } - else - { - $namespace = implode('.', $this->block_names); - } + $namespace = implode('.', $block); // Get a reference to the data array for this block that depends on the // current indices of all parent blocks. |