mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix output filter must not run before writing cache when template does contain nocache code {Issue 71}
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
- bugfix typo in Smarty_Internal_Get_IncludePath did cause runtime overhead (Issue 74)
|
- bugfix typo in Smarty_Internal_Get_IncludePath did cause runtime overhead (Issue 74)
|
||||||
- improvment remove unneeded assigments (Issue 75 and 76)
|
- improvment remove unneeded assigments (Issue 75 and 76)
|
||||||
- fixed typo in template parser
|
- fixed typo in template parser
|
||||||
|
- bugfix output filter must not run before writing cache when template does contain nocache code {Issue 71}
|
||||||
|
|
||||||
02.01.2012
|
02.01.2012
|
||||||
- bugfix {block foo nocache} did not load plugins within child {block} in nocache mode (Forum Topic 20753)
|
- bugfix {block foo nocache} did not load plugins within child {block} in nocache mode (Forum Topic 20753)
|
||||||
|
@@ -242,7 +242,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data {
|
|||||||
$output .= preg_replace("!/\*/?%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!", '', $cache_parts[0][$curr_idx]);
|
$output .= preg_replace("!/\*/?%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!", '', $cache_parts[0][$curr_idx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
|
if (!$no_output_filter && !$_template->has_nocache_code && (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);
|
||||||
}
|
}
|
||||||
// rendering (must be done before writing cache file because of {function} nocache handling)
|
// rendering (must be done before writing cache file because of {function} nocache handling)
|
||||||
@@ -293,7 +293,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) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
|
if ((!$this->caching || $_template->has_nocache_code || $_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