- bugfix output filters did not observe nocache code flag https://github.com/smarty-php/smarty/issues/160

This commit is contained in:
uwetews
2016-01-27 00:35:04 +01:00
parent 71f71e6262
commit 04d9c5cc34
4 changed files with 6 additions and 4 deletions

View File

@@ -4,6 +4,7 @@
- bugfix {$smarty.section.customer.loop} did throw compiler error https://github.com/smarty-php/smarty/issues/161 - bugfix {$smarty.section.customer.loop} did throw compiler error https://github.com/smarty-php/smarty/issues/161
update of yesterdays fix update of yesterdays fix
- bugfix string resource could inject code at {block} or inline subtemplates through PHP comments https://github.com/smarty-php/smarty/issues/157 - bugfix string resource could inject code at {block} or inline subtemplates through PHP comments https://github.com/smarty-php/smarty/issues/157
- bugfix output filters did not observe nocache code flag https://github.com/smarty-php/smarty/issues/160
26.01.2016 26.01.2016
- improvement observe Smarty::$_CHARSET in debugging console https://github.com/smarty-php/smarty/issues/169 - improvement observe Smarty::$_CHARSET in debugging console https://github.com/smarty-php/smarty/issues/169

View File

@@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.30-dev/22'; const SMARTY_VERSION = '3.1.30-dev/23';
/** /**
* define variable scopes * define variable scopes

View File

@@ -29,16 +29,17 @@ class Smarty_Internal_Runtime_CodeFrame
Smarty_Internal_TemplateCompilerBase $compiler = null) Smarty_Internal_TemplateCompilerBase $compiler = null)
{ {
// build property code // build property code
$properties[ 'has_nocache_code' ] = $_template->compiled->has_nocache_code;
$properties[ 'version' ] = Smarty::SMARTY_VERSION; $properties[ 'version' ] = Smarty::SMARTY_VERSION;
$properties[ 'unifunc' ] = 'content_' . str_replace(array('.', ','), '_', uniqid('', true)); $properties[ 'unifunc' ] = 'content_' . str_replace(array('.', ','), '_', uniqid('', true));
if (!$cache) { if (!$cache) {
$properties[ 'has_nocache_code' ] = $_template->compiled->has_nocache_code;
$properties[ 'file_dependency' ] = $_template->compiled->file_dependency; $properties[ 'file_dependency' ] = $_template->compiled->file_dependency;
$properties[ 'includes' ] = $_template->compiled->includes; $properties[ 'includes' ] = $_template->compiled->includes;
if (!empty($compiler->tpl_function)) { if (!empty($compiler->tpl_function)) {
$properties[ 'tpl_function' ] = $compiler->tpl_function; $properties[ 'tpl_function' ] = $compiler->tpl_function;
} }
} else { } else {
$properties[ 'has_nocache_code' ] = $_template->cached->has_nocache_code;
$properties[ 'file_dependency' ] = $_template->cached->file_dependency; $properties[ 'file_dependency' ] = $_template->cached->file_dependency;
$properties[ 'cache_lifetime' ] = $_template->cache_lifetime; $properties[ 'cache_lifetime' ] = $_template->cache_lifetime;
if (!empty($_template->tpl_function)) { if (!empty($_template->tpl_function)) {

View File

@@ -61,7 +61,7 @@ class Smarty_Internal_Runtime_UpdateCache
$content .= $cache_parts[1][$curr_idx]; $content .= $cache_parts[1][$curr_idx];
} }
} }
if (!$no_output_filter && !$_template->compiled->has_nocache_code && if (!$no_output_filter && !$_template->cached->has_nocache_code &&
(isset($_template->smarty->autoload_filters['output']) || (isset($_template->smarty->autoload_filters['output']) ||
isset($_template->smarty->registered_filters['output'])) isset($_template->smarty->registered_filters['output']))
) { ) {