From 09dfffd2a010c4d48b6947f0122dec843a9071f3 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Thu, 5 Aug 2010 21:13:29 +0000 Subject: [PATCH] - bugfix in nocache sections {include} must not cache the subtemplate --- change_log.txt | 1 + libs/sysplugins/smarty_internal_compile_include.php | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 84f89678..1b900c73 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ 05/08/2010 - added plugin type modifiercompiler to produce compiled modifier code - changed standard modifier plugins to the compiling versions whenever possible +- bugfix in nocache sections {include} must not cache the subtemplate 02/08/2010 - bugfix strip did not work correctly in conjunction with comment lines diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 89b451e3..54777b02 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -86,9 +86,12 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase { $_parent_scope = SMARTY_GLOBAL_SCOPE; } } - $_caching = 'null'; + $_caching = 'null'; + if ($this->compiler->nocache || $this->compiler->tag_nocache) { + $_caching = SMARTY_CACHING_OFF; + } // default for included templates - if ($this->compiler->template->caching && !$this->compiler->nocache) { + if ($this->compiler->template->caching && !$this->compiler->nocache && !$this->compiler->tag_nocache) { $_caching = 9999; } /*