mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04: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 =====
|
===== trunk =====
|
||||||
|
24.11.2011
|
||||||
|
- bugfix a subtemplate later used as main template did use old variable values
|
||||||
|
|
||||||
21.11.2011
|
21.11.2011
|
||||||
- bugfix cache file could include unneeded modifier plugins under certain condition
|
- 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 = clone $this->template_objects[$_templateId];
|
||||||
$tpl->smarty = clone $tpl->smarty;
|
$tpl->smarty = clone $tpl->smarty;
|
||||||
$tpl->parent = $parent;
|
$tpl->parent = $parent;
|
||||||
|
$tpl->tpl_vars = array();
|
||||||
|
$tpl->config_vars = array();
|
||||||
} else {
|
} else {
|
||||||
$tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id);
|
$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])) {
|
if (isset($this->template_objects[$_templateId])) {
|
||||||
// return cached template object
|
// return cached template object
|
||||||
$tpl = $this->template_objects[$_templateId];
|
$tpl = $this->template_objects[$_templateId];
|
||||||
|
$tpl->parent = $parent;
|
||||||
|
$tpl->tpl_vars = array();
|
||||||
|
$tpl->config_vars = array();
|
||||||
} else {
|
} else {
|
||||||
$tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id);
|
$tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user