mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix default parameter values did not work for template functions included with {include}
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
27/10/2010
|
||||
- bugfix default parameter values did not work for template functions included with {include}
|
||||
|
||||
25/10/2010
|
||||
- bugfix for E_NOTICE change, array elements did not work as modifier parameter
|
||||
|
||||
|
@@ -43,6 +43,7 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase {
|
||||
$output = "<?php if (!function_exists('smarty_template_function_{$_name}')) {
|
||||
function smarty_template_function_{$_name}(\$_smarty_tpl,\$params) {
|
||||
\$saved_tpl_vars = \$_smarty_tpl->tpl_vars;
|
||||
foreach (\$_smarty_tpl->smarty->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(trim(\$value,'\''));};
|
||||
foreach (\$params as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}?>";
|
||||
}
|
||||
// Init temporay context
|
||||
|
Reference in New Issue
Block a user