From 806c51fdcf0ce792412882da90738297dfd8a653 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Thu, 13 Oct 2011 11:59:02 +0000 Subject: [PATCH] - bugfix disable of caching after isCached() call did not work (Forum Topic 20131) --- change_log.txt | 1 + libs/sysplugins/smarty_internal_templatebase.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/change_log.txt b/change_log.txt index 0bb14870..b29df9aa 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== trunk ===== 13.10.2011 - add caching for config files in Smarty_Resource +- bugfix disable of caching after isCached() call did not work (Forum Topic 20131) 11.10.2011 - add runtime checks for not matching {capture}/{/capture} calls (Forum Topic 20120) diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php index ab12f938..2471fc82 100644 --- a/libs/sysplugins/smarty_internal_templatebase.php +++ b/libs/sysplugins/smarty_internal_templatebase.php @@ -45,6 +45,10 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data { $_template = ($template instanceof $this->template_class) ? $template : $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false); + // if called by Smarty object make sure we use current caching status + if ($this instanceof Smarty) { + $_template->caching = $this->caching; + } // merge all variable scopes into template if ($merge_tpl_vars) { // save local variables