diff --git a/change_log.txt b/change_log.txt index db830696..2f9ebffa 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +03/06/2010 +- bugfix on calling template functions like Smarty tags + 01/06/2010 - bugfix on template functions used with template inheritance - removed /* vim: set expandtab: */ comments diff --git a/libs/sysplugins/smarty_internal_compile_function.php b/libs/sysplugins/smarty_internal_compile_function.php index 1f2fc020..88eec3db 100644 --- a/libs/sysplugins/smarty_internal_compile_function.php +++ b/libs/sysplugins/smarty_internal_compile_function.php @@ -31,12 +31,11 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase { $this->_open_tag('function', $save); $_name = trim($_attr['name'], "'\""); unset($_attr['name']); + $compiler->template->properties['function'][$_name]['parameter'] = array(); foreach ($_attr as $_key => $_data) { $compiler->template->properties['function'][$_name]['parameter'][$_key] = $_data; } - if (isset($compiler->template->properties['function'][$_name]['parameter'])) { - $compiler->smarty->template_functions[$_name]['parameter'] = $compiler->template->properties['function'][$_name]['parameter']; - } + $compiler->smarty->template_functions[$_name]['parameter'] = $compiler->template->properties['function'][$_name]['parameter']; if ($compiler->template->caching) { $output = ''; } else {