mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +00:00
git-svn-id: file:///svn/phpbb/trunk@6812 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5225e5da5c
commit
1d8e391d19
1 changed files with 12 additions and 11 deletions
|
@ -315,7 +315,17 @@ class template_compile
|
||||||
$tag_template_php = '';
|
$tag_template_php = '';
|
||||||
array_push($this->block_names, $tag_args);
|
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.
|
// Block is not nested.
|
||||||
$tag_template_php = '$_' . $tag_args . "_count = (isset(\$this->_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;";
|
$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
|
else
|
||||||
{
|
{
|
||||||
// This block is nested.
|
// This block is nested.
|
||||||
|
|
||||||
// Generate a namespace string for this block.
|
// Generate a namespace string for this block.
|
||||||
if ($no_nesting !== false)
|
$namespace = implode('.', $block);
|
||||||
{
|
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get a reference to the data array for this block that depends on the
|
// Get a reference to the data array for this block that depends on the
|
||||||
// current indices of all parent blocks.
|
// current indices of all parent blocks.
|
||||||
|
|
Loading…
Add table
Reference in a new issue