mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix assign() in plugins called in subtemplates did change value also in parent template
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
===== trunk =====
|
||||
04.10.2011
|
||||
- bugfix assign() in plugins called in subtemplates did change value also in parent template
|
||||
|
||||
===== Smarty-3.1.2 =====
|
||||
03.10.2011
|
||||
- improvement add internal $joined_template_dir property instead computing it on the fly several times
|
||||
|
@@ -56,24 +56,14 @@ class Smarty_Internal_Data {
|
||||
if (is_array($tpl_var)) {
|
||||
foreach ($tpl_var as $_key => $_val) {
|
||||
if ($_key != '') {
|
||||
if (isset($this->tpl_vars[$_key])) {
|
||||
$this->tpl_vars[$_key]->value = $_val;
|
||||
$this->tpl_vars[$_key]->nocache = $nocache;
|
||||
} else {
|
||||
$this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($tpl_var != '') {
|
||||
if (isset($this->tpl_vars[$tpl_var])) {
|
||||
$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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user