Skip to content

Commit

Permalink
- bugfix output filters did not observe nocache code flag #160
Browse files Browse the repository at this point in the history
  • Loading branch information
uwetews committed Jan 26, 2016
1 parent 71f71e6 commit 04d9c5c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion change_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
- bugfix {$smarty.section.customer.loop} did throw compiler error https://github.com/smarty-php/smarty/issues/161
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 output filters did not observe nocache code flag https://github.com/smarty-php/smarty/issues/160

26.01.2016
- improvement observe Smarty::$_CHARSET in debugging console https://github.com/smarty-php/smarty/issues/169
- bugfix compiling {section} did create warning
Expand Down
2 changes: 1 addition & 1 deletion libs/Smarty.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
const SMARTY_VERSION = '3.1.30-dev/22';
const SMARTY_VERSION = '3.1.30-dev/23';

/**
* define variable scopes
Expand Down
3 changes: 2 additions & 1 deletion libs/sysplugins/smarty_internal_runtime_codeframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ public function create(Smarty_Internal_Template $_template, $content = '', $func
Smarty_Internal_TemplateCompilerBase $compiler = null)
{
// build property code
$properties[ 'has_nocache_code' ] = $_template->compiled->has_nocache_code;
$properties[ 'version' ] = Smarty::SMARTY_VERSION;
$properties[ 'unifunc' ] = 'content_' . str_replace(array('.', ','), '_', uniqid('', true));
if (!$cache) {
$properties[ 'has_nocache_code' ] = $_template->compiled->has_nocache_code;
$properties[ 'file_dependency' ] = $_template->compiled->file_dependency;
$properties[ 'includes' ] = $_template->compiled->includes;
if (!empty($compiler->tpl_function)) {
$properties[ 'tpl_function' ] = $compiler->tpl_function;
}
} else {
$properties[ 'has_nocache_code' ] = $_template->cached->has_nocache_code;
$properties[ 'file_dependency' ] = $_template->cached->file_dependency;
$properties[ 'cache_lifetime' ] = $_template->cache_lifetime;
if (!empty($_template->tpl_function)) {
Expand Down
2 changes: 1 addition & 1 deletion libs/sysplugins/smarty_internal_runtime_updatecache.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function removeNoCacheHash(Smarty_Template_Cached $cached, Smarty_Interna
$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->registered_filters['output']))
) {
Expand Down

0 comments on commit 04d9c5c

Please sign in to comment.