From e82f966682fa7b2f7ba423322eb3abc3f0d7caaf Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 7 Sep 2016 00:06:17 +0200 Subject: [PATCH] - bugfix using nocache like attribute with value true like {plugin nocache=true} did not work https://github.com/smarty-php/smarty/issues/285 --- change_log.txt | 3 +++ libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_templatecompilerbase.php | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index 390eb471..18e21076 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== 3.1.31-dev ===== (xx.xx.xx) + 07.09.2016 + - bugfix using nocache like attribute with value true like {plugin nocache=true} did not work https://github.com/smarty-php/smarty/issues/285 + 01.09.2016 - performance require_once should be called only once for shared plugins https://github.com/smarty-php/smarty/issues/280 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index ad1eb955..5a2e4e09 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/8'; + const SMARTY_VERSION = '3.1.31-dev/9'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 053c853b..7210374e 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -513,12 +513,12 @@ abstract class Smarty_Internal_TemplateCompilerBase // check nocache option flag foreach ($args as $arg) { if (!is_array($arg)) { - if ($arg == "'nocache'") { + if ($arg === "'nocache'" || $arg === 'nocache') { $this->tag_nocache = true; } } else { foreach ($arg as $k => $v) { - if ($k == "'nocache'" && (trim($v, "'\" ") == 'true')) { + if (($k === "'nocache'" || $k === 'nocache') && (trim($v, "'\" ") == 'true')) { $this->tag_nocache = true; } }