diff --git a/change_log.txt b/change_log.txt index 114a0476..cf4e5d65 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +20.11.2012 +- bugfix assignGlobal() called from plugins did not work (Forum Topic 23771) + 13.11.2012 - adding attribute "strict" to html_options, html_checkboxes, html_radios to only print disabled/readonly attributes if their values are true or "disabled"/"readonly" (Issue #120) diff --git a/libs/sysplugins/smarty_internal_data.php b/libs/sysplugins/smarty_internal_data.php index 5baf3b76..1d7b1d33 100644 --- a/libs/sysplugins/smarty_internal_data.php +++ b/libs/sysplugins/smarty_internal_data.php @@ -80,6 +80,11 @@ class Smarty_Internal_Data { { if ($varname != '') { Smarty::$global_tpl_vars[$varname] = new Smarty_variable($value, $nocache); + $ptr = $this; + while ($ptr instanceof Smarty_Internal_Template) { + $ptr->tpl_vars[$varname] = clone Smarty::$global_tpl_vars[$varname]; + $ptr = $ptr->parent; + } } return $this;