From 2e70e88b0fc4f403bfc9bfd4f3e8ef3a59fd77a0 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Sat, 14 Nov 2009 10:08:27 +0000 Subject: [PATCH] - bugfix on merging compiled templates when source files got removed or renamed. --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_compile_include.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/change_log.txt b/change_log.txt index 8b522606..be9030b1 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +11/14/2009 +- bugfix on merging compiled templates when source files got removed or renamed. + 11/12/2009 - fixed variable filenames in {include_php} and {insert} - added scope to Smarty variables in the {block} tag compiler diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 0acd9d7a..0b1b4e43 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -51,6 +51,10 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase { $mtime = filemtime($_file_to_check[0]); } else { $tpl->parseResourceName($_file_to_check[0], $resource_type, $resource_name, $resource_handler); + if ($resource_type == 'file') { + $must_compile = true; // subtemplate no longer existing + break; + } $mtime = $resource_handler->getTemplateTimestampTypeName($resource_type, $resource_name); } If ($mtime != $_file_to_check[1]) {