From d89e53c2f68e627b1109ccd49dc78c37d330463e Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Wed, 17 Mar 2010 17:37:32 +0000 Subject: [PATCH] - bugfix make $smarty->cache->clear() function independent from caching status --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_cacheresource_file.php | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index fe67549c..dd630d77 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +17/03/2010 +- bugfix make $smarty->cache->clear() function independent from caching status + 16/03/2010 - bugfix on assign attribute at registered template objects - make handling of modifiers on expression BC to Smarty2 diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php index 57dcc00f..2895d12b 100644 --- a/libs/sysplugins/smarty_internal_cacheresource_file.php +++ b/libs/sysplugins/smarty_internal_cacheresource_file.php @@ -131,7 +131,10 @@ class Smarty_Internal_CacheResource_File { $_cache_id_parts_count = count($_cache_id_parts); } if (isset($resource_name)) { + $_save_stat = $this->smarty->caching; + $this->smarty->caching = true; $tpl = $this->smarty->createTemplate($resource_name); + $this->smarty->caching = $_save_stat; if ($tpl->isExisting()) { $_resourcename_parts = basename(str_replace('^','/',$tpl->getCachedFilepath())); } else { @@ -184,4 +187,4 @@ class Smarty_Internal_CacheResource_File { } } -?> +?> \ No newline at end of file