- bugfix on {block} if name did contain '-'

This commit is contained in:
uwe.tews@googlemail.com
2010-11-17 19:07:59 +00:00
parent 6d4b6accfd
commit f49ac309b9
3 changed files with 6 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase {
// output will be stored in a smarty variable instead of beind displayed
$_assign = $_attr['assign'];
}
$_name = trim($_attr['name'], "'\"");
$_name = $_attr['name'];
unset($_attr['name'], $_attr['assign'], $_attr['nocache']);
// set flag (compiled code of {function} must be included in cache file
if ($compiler->nocache || $compiler->tag_nocache) {
@@ -78,8 +78,9 @@ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase {
//varibale name?
if (!(strpos($_name,'$')===false)) {
$call_cache = $_name;
$call_function = "\$tmp = \"smarty_template_function_{{$_name}}\"; \$tmp";
$call_function = '$tmp = "smarty_template_function_".'.$_name.'; $tmp';
} else {
$_name = trim($_name, "'\"");
$call_cache = "'{$_name}'";
$call_function = 'smarty_template_function_'.$_name;
}