introduce Smarty::$resource_cache_mode and cache template object of {include} inside loop

This commit is contained in:
uwetews
2015-08-10 21:57:06 +02:00
parent 5c9c57df7d
commit 0260b525b8
10 changed files with 107 additions and 60 deletions

View File

@@ -53,6 +53,7 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
$compiler->loopNesting++;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
@@ -101,6 +102,7 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
$compiler->loopNesting--;
$this->compiler = $compiler;
$saved_data = $this->closeTag($compiler, array('function'));
$_attr = $saved_data[0];