diff --git a/change_log.txt b/change_log.txt index 7e61b185..7b72841f 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@ ===== Smarty 3.1 trunk ===== 19.09.2011 - bugfix regression in Smarty_CacheReource_KeyValueStore introduced by r4261 +- bugfix output filter shall not run on included subtemplates 18.09.2011 - bugfix template caching did not care about file.tpl in different template_dir diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index ea48cb08..9050adfb 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -272,7 +272,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase { $tpl->tpl_vars[$_key] = new Smarty_variable($_val); } } - return $tpl->fetch(null, null, null, null, false, false); + return $tpl->fetch(null, null, null, null, false, false, true); } /** diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php index c3b5f8f9..b7dcdf28 100644 --- a/libs/sysplugins/smarty_internal_templatebase.php +++ b/libs/sysplugins/smarty_internal_templatebase.php @@ -26,9 +26,10 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data { * @param object $parent next higher level of Smarty variables * @param bool $display true: display, false: fetch * @param bool $merge_tpl_vars if true parent template variables merged in to local scope + * @param bool $no_output_filter if true do not run output filter * @return string rendered template output */ - public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true) + public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true, $no_output_filter = false) { if ($template === null && $this instanceof $this->template_class) { $template = $this; @@ -266,7 +267,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data { Smarty_Internal_Debug::end_cache($_template); } } - if ((!$this->caching || $_template->source->recompiled) && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) { + if ((!$this->caching || $_template->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) { $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template); } if (isset($this->error_reporting)) {