mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24: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 =====
|
===== 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
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -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)) {
|
||||||
|
Reference in New Issue
Block a user