From a9c19850bb8e8d979b5269d318a68bf963f0dd55 Mon Sep 17 00:00:00 2001 From: danilo Date: Tue, 27 Feb 2007 11:14:10 +0000 Subject: [PATCH] Modified _(push|pop)_cacheable_state() to embedd alternate syntax. See this bug report: http://www.phpinsider.com/smarty-forum/viewtopic.php?t=10502 --- libs/Smarty_Compiler.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index 1f490fde..b404b9f4 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -2238,9 +2238,9 @@ class Smarty_Compiler extends Smarty { if ($_cacheable || 0<$this->_cacheable_state++) return ''; if (!isset($this->_cache_serial)) $this->_cache_serial = md5(uniqid('Smarty')); - $_ret = 'if ($this->caching && !$this->_cache_including) { echo \'{nocache:' + $_ret = 'if ($this->caching && !$this->_cache_including): echo \'{nocache:' . $this->_cache_serial . '#' . $this->_nocache_count - . '}\'; };'; + . '}\'; endif;'; return $_ret; } @@ -2255,9 +2255,9 @@ class Smarty_Compiler extends Smarty { $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4]; if ($_cacheable || --$this->_cacheable_state>0) return ''; - return 'if ($this->caching && !$this->_cache_including) { echo \'{/nocache:' + return 'if ($this->caching && !$this->_cache_including): echo \'{/nocache:' . $this->_cache_serial . '#' . ($this->_nocache_count++) - . '}\'; };'; + . '}\'; endif;'; }