mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
-change run output filter before cache file is written (as in Smarty2)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
===== SVN trunk =====
|
||||
27/11/2010
|
||||
-change run output filter before cache file is written. (same as in Smarty2)
|
||||
|
||||
24/11/2011
|
||||
-bugfix on parser at !$foo|modifier
|
||||
|
@@ -329,7 +329,7 @@ class Smarty extends Smarty_Internal_Data {
|
||||
}
|
||||
}
|
||||
// return redered template
|
||||
if (isset($this->autoload_filters['output']) || isset($this->registered_filters['output'])) {
|
||||
if ((!$this->caching || $_template->resource_object->isEvaluated) && (isset($this->autoload_filters['output']) || isset($this->registered_filters['output']))) {
|
||||
$_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $_template);
|
||||
} else {
|
||||
$_output = $_template->getRenderedTemplate();
|
||||
|
@@ -103,7 +103,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data {
|
||||
$_template->assign('assigned_vars', $_assigned_vars);
|
||||
$_template->assign('config_vars', $_config_vars);
|
||||
$_template->assign('execution_time', microtime(true) - $smarty->start_time);
|
||||
echo $smarty->fetch($_template);
|
||||
echo $_template->getRenderedTemplate();
|
||||
$smarty->left_delimiter = $ldelim;
|
||||
$smarty->right_delimiter = $rdelim;
|
||||
}
|
||||
|
@@ -500,6 +500,9 @@ class Smarty_Internal_Template extends Smarty_Internal_Data {
|
||||
$output .= preg_replace("!/\*/?%%SmartyNocache:{$this->properties['nocache_hash']}%%\*/!", '', $cache_parts[0][$curr_idx]);
|
||||
}
|
||||
}
|
||||
if (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output'])) {
|
||||
$output = Smarty_Internal_Filter_Handler::runFilter('output', $output, $this);
|
||||
}
|
||||
// rendering (must be done before writing cache file because of {function} nocache handling)
|
||||
$_smarty_tpl = $this;
|
||||
ob_start();
|
||||
|
Reference in New Issue
Block a user