- bugfix assign() in plugins called in subtemplates did change value also in parent template

This commit is contained in:
uwe.tews@googlemail.com
2011-10-04 16:18:24 +00:00
parent 9ca21fac77
commit dbda42bc6c
2 changed files with 11 additions and 18 deletions

View File

@@ -1,4 +1,7 @@
===== trunk ===== ===== trunk =====
04.10.2011
- bugfix assign() in plugins called in subtemplates did change value also in parent template
===== Smarty-3.1.2 ===== ===== Smarty-3.1.2 =====
03.10.2011 03.10.2011
- improvement add internal $joined_template_dir property instead computing it on the fly several times - improvement add internal $joined_template_dir property instead computing it on the fly several times

View File

@@ -56,22 +56,12 @@ class Smarty_Internal_Data {
if (is_array($tpl_var)) { if (is_array($tpl_var)) {
foreach ($tpl_var as $_key => $_val) { foreach ($tpl_var as $_key => $_val) {
if ($_key != '') { if ($_key != '') {
if (isset($this->tpl_vars[$_key])) { $this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache);
$this->tpl_vars[$_key]->value = $_val;
$this->tpl_vars[$_key]->nocache = $nocache;
} else {
$this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache);
}
} }
} }
} else { } else {
if ($tpl_var != '') { if ($tpl_var != '') {
if (isset($this->tpl_vars[$tpl_var])) { $this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache);
$this->tpl_vars[$tpl_var]->value = $value;
$this->tpl_vars[$tpl_var]->nocache = $nocache;
} else {
$this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache);
}
} }
} }