Upload 3.1.20

This commit is contained in:
Uwe Tews
2014-10-18 01:05:22 +02:00
parent 7c6b3d21fa
commit 024b336bea
11 changed files with 2100 additions and 4467 deletions

View File

@@ -135,7 +135,12 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
}
$plugins_string .= "?>/*/%%SmartyNocache:{$compiler->template->properties['nocache_hash']}%%*/';?>\n";
}
// if caching save template function for possible nocache call
// remove last line break from function definition
$last = count($compiler->parser->current_buffer->subtrees) - 1;
if ($compiler->parser->current_buffer->subtrees[$last] instanceof _smarty_linebreak) {
unset($compiler->parser->current_buffer->subtrees[$last]);
}
// if caching save template function for possible nocache call
if ($compiler->template->caching) {
$compiler->template->properties['function'][$_name]['compiled'] .= $plugins_string
. $compiler->parser->current_buffer->to_smarty_php();