mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix multiple Smarty::fetch() of same template when $smarty->merge_compiled_includes = true; could cause function alreday defined error
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
===== 3.1.22-dev ===== (xx.xx.2015)
|
||||
12.02.2015
|
||||
- bugfix multiple Smarty::fetch() of same template when $smarty->merge_compiled_includes = true; could cause function alreday defined error
|
||||
|
||||
11.02.2015
|
||||
- bugfix recursive {includes} did create E_NOTICE message when $smarty->$merge_compiled_includes = true; (github issue #16)
|
||||
- bugfix recursive {includes} did create E_NOTICE message when $smarty->merge_compiled_includes = true; (github issue #16)
|
||||
|
||||
22.01.2015
|
||||
- new feature security can now control access to static methods and properties
|
||||
|
@@ -39,7 +39,8 @@ class Smarty_Internal_Extension_CodeFrame
|
||||
}
|
||||
$output .= "\$_valid = \$_smarty_tpl->decodeProperties(" . var_export($_template->properties, true) . ',' . ($cache ? 'true' : 'false') . ");\n";
|
||||
$output .= "/*/%%SmartyHeaderCode%%*/\n";
|
||||
$output .= "if (\$_valid && !is_callable('{$_template->properties['unifunc']}')) {function {$_template->properties['unifunc']} (\$_smarty_tpl) {\n";
|
||||
$output .= "if (\$_valid && !is_callable('{$_template->properties['unifunc']}')) {\n";
|
||||
$output .= "function {$_template->properties['unifunc']} (\$_smarty_tpl) {\n";
|
||||
// include code for plugins
|
||||
if (!$cache) {
|
||||
if (!empty($_template->required_plugins['compiled'])) {
|
||||
@@ -82,11 +83,12 @@ class Smarty_Internal_Extension_CodeFrame
|
||||
}
|
||||
$output = "<?php\n";
|
||||
$output .= "/*%%SmartyHeaderCode:{$_template->properties['nocache_hash']}%%*/\n";
|
||||
$output .= "if (\$_valid && !is_callable('{$_template->properties['unifunc']}')) {\n";
|
||||
$output .= "function {$_template->properties['unifunc']} (\$_smarty_tpl) {\n";
|
||||
$output .= "?>\n" . $content;
|
||||
$output .= "<?php\n";
|
||||
$output .= "/*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%*/\n";
|
||||
$output .= "}\n?>";
|
||||
$output .= "}\n}\n?>";
|
||||
return $output;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user