mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-28 18:02:07 +02:00
- retaining newlines at registered functions and function plugins
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user