- bugfix update of 04.08.2016 was incomplete

This commit is contained in:
uwetews
2016-08-07 15:31:01 +02:00
parent 25ad0b3b5a
commit 761e516a32
5 changed files with 19 additions and 12 deletions

View File

@@ -35,16 +35,10 @@ class Smarty_Internal_Runtime_CodeFrame
$properties[ 'has_nocache_code' ] = $_template->compiled->has_nocache_code;
$properties[ 'file_dependency' ] = $_template->compiled->file_dependency;
$properties[ 'includes' ] = $_template->compiled->includes;
if (!empty($compiler->tpl_function)) {
$properties[ 'tpl_function' ] = $compiler->tpl_function;
}
} else {
} else {
$properties[ 'has_nocache_code' ] = $_template->cached->has_nocache_code;
$properties[ 'file_dependency' ] = $_template->cached->file_dependency;
$properties[ 'cache_lifetime' ] = $_template->cache_lifetime;
if (!empty($_template->tpl_function)) {
$properties[ 'tpl_function' ] = $_template->tpl_function;
}
}
$output = "<?php\n";
$output .= "/* Smarty version " . Smarty::SMARTY_VERSION . ", created on " . strftime("%Y-%m-%d %H:%M:%S") .
@@ -54,6 +48,15 @@ class Smarty_Internal_Runtime_CodeFrame
($cache ? 'true' : 'false') . ")";
$output .= "if ({$dec}) {\n";
$output .= "function {$properties['unifunc']} (Smarty_Internal_Template \$_smarty_tpl) {\n";
if (!$cache && !empty($compiler->tpl_function)) {
$output .= "\$_smarty_tpl->ext->_tplFunction->registerTplFunctions(\$_smarty_tpl, " .
var_export($compiler->tpl_function, true) . ");\n";
}
if ($cache && isset($_template->ext->_tplFunction)) {
$output .= "\$_smarty_tpl->ext->_tplFunction->registerTplFunctions(\$_smarty_tpl, " .
var_export($_template->ext->_tplFunction->getTplFunction(), true) . ");\n";
}
// include code for plugins
if (!$cache) {
if (!empty($_template->compiled->required_plugins[ 'compiled' ])) {