From 4914c90e9aa38f460347c9f4edd6477f60ac7b16 Mon Sep 17 00:00:00 2001 From: "uwe.tews" Date: Fri, 23 Oct 2009 16:49:21 +0000 Subject: [PATCH] - fixed nocache var problem --- .../sysplugins/internal.compile_block_plugin.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/sysplugins/internal.compile_block_plugin.php b/libs/sysplugins/internal.compile_block_plugin.php index a21612e1..321aba80 100644 --- a/libs/sysplugins/internal.compile_block_plugin.php +++ b/libs/sysplugins/internal.compile_block_plugin.php @@ -36,22 +36,22 @@ class Smarty_Internal_Compile_Block_Plugin extends Smarty_Internal_CompileBase { } $_params = 'array(' . implode(",", $_paramsArray) . ')'; - $this->_open_tag($tag, array($_params, $this->compiler->nocache,$this->compiler->tag_nocache)); + $this->_open_tag($tag, array($_params, $this->compiler->nocache)); // not cachable? if (isset($this->compiler->smarty->registered_plugins[$tag]) && !$this->compiler->smarty->registered_plugins[$tag][2]) { $this->compiler->nocache = true; } - // compile code + // maybe nocache because of nocache variables + $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; + // compile code $output = 'smarty->plugin_handler->' . $tag . '(array(' . $_params . ', null, $_smarty_tpl->smarty, &$_block_repeat, $_smarty_tpl),\'block\');while ($_block_repeat) { ob_start();?>'; } else { - if ($this->compiler->nocache) { - $this->compiler->tag_nocache = true; - } - // closing tag of block plugin - list($_params, $this->compiler->nocache,$tag_nocache) = $this->_close_tag(substr($tag, 0, -5)); - if ($tag_nocache) { + // must endblock be nocache? + if ($this->compiler->nocache) { $this->compiler->tag_nocache = true; } + // closing tag of block plugin, restore nocache + list($_params, $this->compiler->nocache) = $this->_close_tag(substr($tag, 0, -5)); // This tag does create output $this->compiler->has_output = true; // compile code