mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-09 21:04:28 +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
|
22/03/2010
|
||||||
- bugfix make directory separator operating system independend in compileAllTemplates()
|
- bugfix make directory separator operating system independend in compileAllTemplates()
|
||||||
|
|
||||||
|
@@ -222,6 +222,7 @@ class Smarty extends Smarty_Internal_Data {
|
|||||||
public $smarty = null;
|
public $smarty = null;
|
||||||
// block data at template inheritance
|
// block data at template inheritance
|
||||||
public $block_data = array();
|
public $block_data = array();
|
||||||
|
public $block_data_stack = array();
|
||||||
// block tag hierarchy
|
// block tag hierarchy
|
||||||
public $_tag_stack = array();
|
public $_tag_stack = array();
|
||||||
// plugins
|
// plugins
|
||||||
@@ -310,6 +311,8 @@ class Smarty extends Smarty_Internal_Data {
|
|||||||
// get default Smarty data object
|
// get default Smarty data object
|
||||||
$parent = $this;
|
$parent = $this;
|
||||||
}
|
}
|
||||||
|
array_push($this->block_data_stack, $this->block_data);
|
||||||
|
$this->block_data = array();
|
||||||
// create template object if necessary
|
// create template object if necessary
|
||||||
($template instanceof $this->template_class)? $_template = $template :
|
($template instanceof $this->template_class)? $_template = $template :
|
||||||
$_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent);
|
$_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent);
|
||||||
@@ -352,9 +355,11 @@ class Smarty extends Smarty_Internal_Data {
|
|||||||
if ($this->debugging) {
|
if ($this->debugging) {
|
||||||
Smarty_Internal_Debug::display_debug($this);
|
Smarty_Internal_Debug::display_debug($this);
|
||||||
}
|
}
|
||||||
|
$this->block_data = array_pop($this->block_data_stack);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// return fetched content
|
// return fetched content
|
||||||
|
$this->block_data = array_pop($this->block_data_stack);
|
||||||
return $_output;
|
return $_output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user