[prev in list] [next in list] [prev in thread] [next in thread]
List: smarty-cvs
Subject: [SMARTY-CVS] cvs: smarty /libs/core core.process_compiled_include.php core.read_cache_file.php
From: "Messju Mohr" <messju () php ! net>
Date: 2003-07-17 19:25:22
[Download RAW message or body]
messju Thu Jul 17 15:25:22 2003 EDT
Modified files:
/smarty/libs/core core.process_compiled_include.php
core.read_cache_file.php
Log:
improved checking of compiled_include against cached-template with \
non-cached-chunks
Index: smarty/libs/core/core.process_compiled_include.php
diff -u smarty/libs/core/core.process_compiled_include.php:1.2 \
smarty/libs/core/core.process_compiled_include.php:1.3
--- smarty/libs/core/core.process_compiled_include.php:1.2 Sun Jun 29 20:08:28 2003
+++ smarty/libs/core/core.process_compiled_include.php Thu Jul 17 15:25:22 2003
@@ -18,7 +18,6 @@
{
$_return = $params['results'];
foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
- $smarty->smarty_include($_include_file_path, true);
$_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
array(&$smarty, \
'_process_compiled_include_callback'), $_return);
Index: smarty/libs/core/core.read_cache_file.php
diff -u smarty/libs/core/core.read_cache_file.php:1.7 \
smarty/libs/core/core.read_cache_file.php:1.8
--- smarty/libs/core/core.read_cache_file.php:1.7 Sat Jun 21 23:13:25 2003
+++ smarty/libs/core/core.read_cache_file.php Thu Jul 17 15:25:22 2003
@@ -91,9 +91,16 @@
}
}
- $smarty->_cache_serials = array_merge($smarty->_cache_serials,
- $smarty->_cache_info['cache_serials']);
-
+ foreach ($smarty->_cache_info['cache_serials'] as \
$_include_file_path=>$_cache_serial) { + if \
(empty($smarty->_cache_serials[$_include_file_path])) { + \
$smarty->smarty_include($_include_file_path, true); + }
+
+ if ($smarty->_cache_serials[$_include_file_path] != $_cache_serial) {
+ /* regenerate */
+ return false;
+ }
+ }
$params['results'] = $cache_split[1];
$content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']] \
= array($params['results'], $smarty->_cache_info);
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic