mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 21:31:48 +01:00
- bugfix on {block} if name did contain '-'
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user