From d157cac590a1e9c48804b3f212af0e3f329648b2 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Tue, 27 Mar 2012 14:44:46 +0000 Subject: [PATCH] - bugfix prefilter did run multiple times on inline subtemplates compiled into several main templates (Forum Topic 21325) --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_templatecompilerbase.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 765434f9..ec0b1115 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== +27.03.2012 +- bugfix prefilter did run multiple times on inline subtemplates compiled into several main templates (Forum Topic 21325) + 21.03.2012 - bugfix compileAllTemplates() and compileAllConfig() did not return the number of compiled files (Forum Topic 21286) diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index c04e1ed2..51a8ce81 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -161,7 +161,7 @@ abstract class Smarty_Internal_TemplateCompilerBase { $_content = $template->source->content; // run prefilter if required if (isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])) { - $template->source->content = $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template); + $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template); } // on empty template just return header if ($_content == '') {