cvs: smarty /libs/internals core.write_compiled_include.php

"Messju Mohr" <[email protected]> Tue, 06 Mar 2007 10:36:01 -0000
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1173177361@cvsserver>
messju		Tue Mar  6 10:36:01 2007 UTC

  Modified files:              
    /smarty/libs/internals	core.write_compiled_include.php 
  Log:
  fixed detection of non-cached block when writing compiled includes
  
  
  
http://cvs.php.net/viewvc.cgi/smarty/libs/internals/core.write_compiled_include.php?r1=1.5&r2=1.6&diff_format=u
Index: smarty/libs/internals/core.write_compiled_include.php
diff -u smarty/libs/internals/core.write_compiled_include.php:1.5 smarty/libs/internals/core.write_compiled_include.php:1.6
--- smarty/libs/internals/core.write_compiled_include.php:1.5	Tue Nov 29 15:20:27 2005
+++ smarty/libs/internals/core.write_compiled_include.php	Tue Mar  6 10:36:01 2007
@@ -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;
 

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php