From 66992997679f758b8c2ab448230cec4241028340 Mon Sep 17 00:00:00 2001 From: uwetews Date: Thu, 20 Oct 2016 00:53:04 +0200 Subject: [PATCH] - 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 --- change_log.txt | 4 ++++ libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_compile_private_php.php | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index cbcdeedd6..287514bf6 100644 --- a/change_log.txt +++ b/change_log.txt @@ -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 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 0459030f7..d6dd4028f 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -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 diff --git a/libs/sysplugins/smarty_internal_compile_private_php.php b/libs/sysplugins/smarty_internal_compile_private_php.php index 49ded00fc..8bff8499f 100644 --- a/libs/sysplugins/smarty_internal_compile_private_php.php +++ b/libs/sysplugins/smarty_internal_compile_private_php.php @@ -63,7 +63,6 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $ 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 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $ $output . "';?>", true))); - $compiler->template->compiled->has_nocache_code = $save; return ''; } elseif ($compiler->php_handling == Smarty::PHP_ALLOW) { if (!($compiler->smarty instanceof SmartyBC)) {