fixed problems with cached templates containing nocache sections when

they where displayed multiple times during a single request
This commit is contained in:
messju
2005-07-08 18:11:22 +00:00
parent 96f99ccc9a
commit edab07b69d
2 changed files with 5 additions and 10 deletions

View File

@@ -20,6 +20,11 @@ function smarty_core_process_compiled_include($params, &$smarty)
$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'),

View File

@@ -90,16 +90,6 @@ function smarty_core_read_cache_file(&$params, &$smarty)
}
}
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;