- bugfix on template inheritance when calling multiple child/parent relations

This commit is contained in:
Uwe.Tews
2010-03-23 16:51:48 +00:00
parent 7f64fdc593
commit 2e27c294b3
2 changed files with 12 additions and 4 deletions

View File

@@ -1,3 +1,6 @@
23/03/2010
- bugfix on template inheritance when calling multiple child/parent relations
22/03/2010
- bugfix make directory separator operating system independend in compileAllTemplates()

View File

@@ -222,6 +222,7 @@ class Smarty extends Smarty_Internal_Data {
public $smarty = null;
// block data at template inheritance
public $block_data = array();
public $block_data_stack = array();
// block tag hierarchy
public $_tag_stack = array();
// plugins
@@ -310,6 +311,8 @@ class Smarty extends Smarty_Internal_Data {
// get default Smarty data object
$parent = $this;
}
array_push($this->block_data_stack, $this->block_data);
$this->block_data = array();
// create template object if necessary
($template instanceof $this->template_class)? $_template = $template :
$_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent);
@@ -352,9 +355,11 @@ class Smarty extends Smarty_Internal_Data {
if ($this->debugging) {
Smarty_Internal_Debug::display_debug($this);
}
$this->block_data = array_pop($this->block_data_stack);
return;
} else {
// return fetched content
$this->block_data = array_pop($this->block_data_stack);
return $_output;
}
}