- bugfix nocache code was not removed in cache file when subtemplate did contain PHP short tags in text but no other

nocache code https://github.com/smarty-php/smarty/issues/300
This commit is contained in:
uwetews
2016-10-20 00:53:04 +02:00
parent 34e5739fc1
commit 6699299767
3 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,8 @@
===== 3.1.31-dev ===== (xx.xx.xx)
20.10.2016
- bugfix nocache code was not removed in cache file when subtemplate did contain PHP short tags in text but no other
nocache code https://github.com/smarty-php/smarty/issues/300
19.10.2016
- bugfix {make_nocache $var} did fail when variable value did contain '\' https://github.com/smarty-php/smarty/issues/305
- bugfix {make_nocache $var} remove spaces from variable value https://github.com/smarty-php/smarty/issues/304

View File

@@ -114,7 +114,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
const SMARTY_VERSION = '3.1.31-dev/36';
const SMARTY_VERSION = '3.1.31-dev/37';
/**
* define variable scopes

View File

@@ -63,7 +63,6 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
return '';
} elseif ($compiler->php_handling == Smarty::PHP_PASSTHRU || $_attr[ 'type' ] == 'unmatched') {
$compiler->tag_nocache = true;
$save = $compiler->template->compiled->has_nocache_code;
$output = addcslashes($_attr[ 'code' ], "'\\");
$compiler->parser->current_buffer->append_subtree($compiler->parser,
new Smarty_Internal_ParseTree_Tag($compiler->parser,
@@ -71,7 +70,6 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
$output .
"';?>",
true)));
$compiler->template->compiled->has_nocache_code = $save;
return '';
} elseif ($compiler->php_handling == Smarty::PHP_ALLOW) {
if (!($compiler->smarty instanceof SmartyBC)) {