mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
- bugfix output filter shall not run on included subtemplates
This commit is contained in:
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user