- buxfix on assigning array elements inside templates

This commit is contained in:
Uwe.Tews
2009-10-16 13:13:33 +00:00
parent 0fe0ad55c9
commit 395131c2d0
2 changed files with 4 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
10/15/2009
- buxfix on assigning array elements inside templates
10/15/2009
- allow bit operator '&' inside {if} tag
- implementation of ternary operator

View File

@@ -58,7 +58,7 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase {
if ($_attr['index'] == '') {
return "<?php \$_smarty_tpl->append($_attr[var],$_attr[value],false,$_nocache,$_scope);?>";
} else {
return "<?php \$_tmp$_attr[index] = $_attr[value]; \$_smarty_tpl->append($_attr[var],\$_tmp,true,$_nocache,$_scope);?>";
return "<?php \$_tmp$_attr[index] = $_attr[value]; \$_smarty_tpl->append($_attr[var],\$_tmp,true,$_nocache,$_scope); unset (\$_tmp);?>";
}
} else {
return "<?php \$_smarty_tpl->assign($_attr[var],$_attr[value],$_nocache,$_scope);?>";