- retaining newlines at registered functions and function plugins

This commit is contained in:
Uwe.Tews
2010-02-02 20:09:57 +00:00
parent 3c88d12e00
commit fde7a592f4
7 changed files with 11 additions and 8 deletions
@@ -42,9 +42,9 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
$_params = 'array(' . implode(",", $_paramsArray) . ')';
// compile code
if (is_array($function)) {
$output = '<?php echo call_user_func_array(array(\'' . $function[0] . '\',\'' . $function[1] . '\'),(array(' . $_params . ',$_smarty_tpl->smarty,$_smarty_tpl));?>';
$output = "<?php echo call_user_func_array(array('{$function[0]}','{$function[1]}'),(array({$_params},\$_smarty_tpl->smarty,\$_smarty_tpl));?>\n";
} else {
$output = '<?php echo ' . $function . '(' . $_params . ',$_smarty_tpl->smarty,$_smarty_tpl);?>';
$output = "<?php echo {$function}({$_params},\$_smarty_tpl->smarty,\$_smarty_tpl);?>\n";
}
return $output;
}