- bugfix output filter shall not run on included subtemplates

This commit is contained in:
uwe.tews@googlemail.com
2011-09-19 21:13:44 +00:00
parent c877da74de
commit c8eb5d078a
3 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
===== Smarty 3.1 trunk ===== ===== Smarty 3.1 trunk =====
19.09.2011 19.09.2011
- bugfix regression in Smarty_CacheReource_KeyValueStore introduced by r4261 - bugfix regression in Smarty_CacheReource_KeyValueStore introduced by r4261
- bugfix output filter shall not run on included subtemplates
18.09.2011 18.09.2011
- bugfix template caching did not care about file.tpl in different template_dir - bugfix template caching did not care about file.tpl in different template_dir

View File

@@ -272,7 +272,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
$tpl->tpl_vars[$_key] = new Smarty_variable($_val); $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);
} }
/** /**

View File

@@ -26,9 +26,10 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data {
* @param object $parent next higher level of Smarty variables * @param object $parent next higher level of Smarty variables
* @param bool $display true: display, false: fetch * @param bool $display true: display, false: fetch
* @param bool $merge_tpl_vars if true parent template variables merged in to local scope * @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 * @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) { if ($template === null && $this instanceof $this->template_class) {
$template = $this; $template = $this;
@@ -266,7 +267,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data {
Smarty_Internal_Debug::end_cache($_template); 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); $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template);
} }
if (isset($this->error_reporting)) { if (isset($this->error_reporting)) {