- added append array for short form of assign {$foo[]='bar'} and allow assignments to nested arrays {$foo['bla']['blue']='bar'}

This commit is contained in:
Uwe.Tews
2009-04-05 14:49:27 +00:00
parent 45e2a5f0d6
commit 827e9b08d8
3 changed files with 858 additions and 835 deletions

View File

@@ -1,5 +1,8 @@
04/05/2009
- added append array for short form of assign {$foo[]='bar'} and allow assignments to nested arrays {$foo['bla']['blue']='bar'}
04/04/2009
- make output of template default handlers cachable
- make output of template default handlers cachable and save compiled source
- some fixes on yesterdays update
04/03/2006

View File

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

File diff suppressed because it is too large Load Diff