cvs: smarty /libs/internals core.process_compiled_include.php core.read_cache_file.php

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1120846283@cvsserver>
messju		Fri Jul  8 14:11:23 2005 EDT

  Modified files:              
    /smarty/libs/internals	core.process_compiled_include.php 
                          	core.read_cache_file.php 
  Log:
  fixed problems with cached templates containing nocache sections when
  they where displayed multiple times during a single request
  
  
  
http://cvs.php.net/diff.php/smarty/libs/internals/core.process_compiled_include.php?r1=1.1&r2=1.2&ty=u
Index: smarty/libs/internals/core.process_compiled_include.php
diff -u smarty/libs/internals/core.process_compiled_include.php:1.1 smarty/libs/internals/core.process_compiled_include.php:1.2
--- smarty/libs/internals/core.process_compiled_include.php:1.1	Thu Sep 16 19:07:32 2004
+++ smarty/libs/internals/core.process_compiled_include.php	Fri Jul  8 14:11:22 2005
@@ -20,6 +20,11 @@
     $smarty->_cache_including = true;
 
     $_return = $params['results'];
+
+    foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
+        $smarty->_include($_include_file_path, true);
+    }
+
     foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
         $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
                                          array(&$smarty, '_process_compiled_include_callback'),
http://cvs.php.net/diff.php/smarty/libs/internals/core.read_cache_file.php?r1=1.2&r2=1.3&ty=u
Index: smarty/libs/internals/core.read_cache_file.php
diff -u smarty/libs/internals/core.read_cache_file.php:1.2 smarty/libs/internals/core.read_cache_file.php:1.3
--- smarty/libs/internals/core.read_cache_file.php:1.2	Tue Feb  1 05:19:08 2005
+++ smarty/libs/internals/core.read_cache_file.php	Fri Jul  8 14:11:22 2005
@@ -90,16 +90,6 @@
         }
     }
 
-    foreach ($_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
-        if (empty($smarty->_cache_serials[$_include_file_path])) {
-            $smarty->_include($_include_file_path, true);
-        }
-
-        if ($smarty->_cache_serials[$_include_file_path] != $_cache_serial) {
-            /* regenerate */
-            return false;
-        }
-    }
     $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']] = array($params['results'], $_cache_info);
 
     $smarty->_cache_info = $_cache_info;

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.