mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix a subtemplate later used as main template did use old variable values
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
===== trunk =====
|
||||
24.11.2011
|
||||
- bugfix a subtemplate later used as main template did use old variable values
|
||||
|
||||
21.11.2011
|
||||
- bugfix cache file could include unneeded modifier plugins under certain condition
|
||||
|
||||
|
@@ -1191,6 +1191,8 @@ class Smarty extends Smarty_Internal_TemplateBase {
|
||||
$tpl = clone $this->template_objects[$_templateId];
|
||||
$tpl->smarty = clone $tpl->smarty;
|
||||
$tpl->parent = $parent;
|
||||
$tpl->tpl_vars = array();
|
||||
$tpl->config_vars = array();
|
||||
} else {
|
||||
$tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id);
|
||||
}
|
||||
@@ -1198,6 +1200,9 @@ class Smarty extends Smarty_Internal_TemplateBase {
|
||||
if (isset($this->template_objects[$_templateId])) {
|
||||
// return cached template object
|
||||
$tpl = $this->template_objects[$_templateId];
|
||||
$tpl->parent = $parent;
|
||||
$tpl->tpl_vars = array();
|
||||
$tpl->config_vars = array();
|
||||
} else {
|
||||
$tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user