From d3258767a61e65513a79b9f1337b73d564a57ea0 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Mon, 10 Oct 2011 11:38:27 +0000 Subject: [PATCH] - bugfix tag did create wrong output when caching enabled and the tag was in included subtemplate --- change_log.txt | 1 + libs/sysplugins/smarty_internal_templatebase.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index d7c31df4..bf6e4bc2 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== trunk ===== 10.10.2011 - bugfix variable name typo in {html_options} and {html_checkboxes} (Issue #54) +- bugfix tag did create wrong output when caching enabled and the tag was in included subtemplate ===== Smarty-3.1.3 ===== 07.10.2011 diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php index 85245039..97cb1a71 100644 --- a/libs/sysplugins/smarty_internal_templatebase.php +++ b/libs/sysplugins/smarty_internal_templatebase.php @@ -249,10 +249,10 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data { } } else { // var_dump('renderTemplate', $_template->has_nocache_code, $_template->template_resource, $_template->properties['nocache_hash'], $_template->parent->properties['nocache_hash'], $_output); - if ($_template->has_nocache_code && !empty($_template->properties['nocache_hash']) && !empty($_template->parent->properties['nocache_hash'])) { + if (!empty($_template->properties['nocache_hash']) && !empty($_template->parent->properties['nocache_hash'])) { // replace nocache_hash $_output = preg_replace("/{$_template->properties['nocache_hash']}/", $_template->parent->properties['nocache_hash'], $_output); - $_template->parent->has_nocache_code = $_template->has_nocache_code; + $_template->parent->has_nocache_code = $_template->parent->has_nocache_code || $_template->has_nocache_code; } } } else {