mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
- bugfix on template inheritance when calling multiple child/parent relations
This commit is contained in:
@@ -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()
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user