From ab5d8d4e07bb3c8230d0285ef8902ef1979fce51 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 18 Oct 2018 02:39:34 +0200 Subject: Updating Smarty --- ...ty_internal_compile_private_function_plugin.php | 53 ++++++++++++---------- 1 file changed, 29 insertions(+), 24 deletions(-) (limited to 'lib/smarty/sysplugins/smarty_internal_compile_private_function_plugin.php') diff --git a/lib/smarty/sysplugins/smarty_internal_compile_private_function_plugin.php b/lib/smarty/sysplugins/smarty_internal_compile_private_function_plugin.php index 70e7643..0558234 100644 --- a/lib/smarty/sysplugins/smarty_internal_compile_private_function_plugin.php +++ b/lib/smarty/sysplugins/smarty_internal_compile_private_function_plugin.php @@ -1,22 +1,21 @@ has_output = true; - // check and get attributes $_attr = $this->getAttributes($compiler, $args); - if ($_attr['nocache'] === true) { - $compiler->tag_nocache = true; - } - unset($_attr['nocache']); + unset($_attr[ 'nocache' ]); // convert attributes into parameter array string $_paramsArray = array(); foreach ($_attr as $_key => $_value) { @@ -62,12 +59,20 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co $_paramsArray[] = "'$_key'=>$_value"; } } - $_params = 'array(' . implode(",", $_paramsArray) . ')'; + $_params = 'array(' . implode(',', $_paramsArray) . ')'; // compile code - $output = "\n"; + $output = "{$function}({$_params},\$_smarty_tpl)"; + if (!empty($parameter[ 'modifierlist' ])) { + $output = $compiler->compileTag( + 'private_modifier', + array(), + array( + 'modifierlist' => $parameter[ 'modifierlist' ], + 'value' => $output + ) + ); + } + $output = "\n"; return $output; } - } - -?> \ No newline at end of file -- cgit v1.2.3