From 190c012758adc91e4270868fb834ff3ed6ad05d0 Mon Sep 17 00:00:00 2001 From: messju Date: Tue, 6 Mar 2007 10:36:01 +0000 Subject: [PATCH] fixed detection of non-cached block when writing compiled includes --- libs/internals/core.write_compiled_include.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/internals/core.write_compiled_include.php b/libs/internals/core.write_compiled_include.php index 3a780941..c14adb5f 100644 --- a/libs/internals/core.write_compiled_include.php +++ b/libs/internals/core.write_compiled_include.php @@ -15,12 +15,12 @@ function smarty_core_write_compiled_include($params, &$smarty) { - $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\'; \};'; - $_tag_end = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\'; \};'; + $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\'; endif;'; + $_tag_end = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{/nocache\:(\\2)#(\\3)\}\'; endif;'; preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us', $params['compiled_content'], $_match_source, PREG_SET_ORDER); - + // no nocache-parts found: done if (count($_match_source)==0) return;