From ff6a8521bb588187eefa2695c3959fe101d22c18 Mon Sep 17 00:00:00 2001 From: uwetews Date: Fri, 11 Mar 2016 03:36:43 +0100 Subject: [PATCH] - improvement $smarty->clearCompiledTemplate() should return on recompiled or uncompiled resources --- change_log.txt | 1 + libs/Smarty.class.php | 2 +- .../sysplugins/smarty_internal_method_clearcompiledtemplate.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 34c81406..91aec313 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@  ===== 3.1.30-dev ===== (xx.xx.xx) 11.03.2014 - optimization of capture and security handling + - improvement $smarty->clearCompiledTemplate() should return on recompiled or uncompiled resources 10.03.2014 - optimization of resource processing diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index ccf06ac7..d6098fd2 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.30-dev/56'; + const SMARTY_VERSION = '3.1.30-dev/57'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php b/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php index 82c8d4c3..90262d6f 100644 --- a/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php +++ b/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php @@ -48,7 +48,7 @@ class Smarty_Internal_Method_ClearCompiledTemplate /* @var Smarty_Internal_Template $tpl */ $tpl = new $smarty->template_class($resource_name, $smarty); $smarty->caching = $_save_stat; - if ($tpl->source->exists) { + if (!$tpl->source->handler->uncompiled && !$tpl->source->handler->recompiled && $tpl->source->exists) { $_resource_part_1 = basename(str_replace('^', DS, $tpl->compiled->filepath)); $_resource_part_1_length = strlen($_resource_part_1); } else {