- bugfix a subtemplate later used as main template did use old variable values

This commit is contained in:
uwe.tews@googlemail.com
2011-11-24 21:08:26 +00:00
parent 8b414e3b8a
commit e8a933e8e0
2 changed files with 8 additions and 0 deletions

View File

@@ -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

View File

@@ -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);
}