fixed timestamp-check of config-files in smarty_core_read_cache_file()

This commit is contained in:
messju
2003-08-14 16:44:03 +00:00
parent db4ee12009
commit 79f491971a
2 changed files with 5 additions and 1 deletions

View File

@@ -1630,6 +1630,9 @@ class Smarty
$_return = false;
$_params = array('resource_name' => $params['resource_name']) ;
if (isset($params['resource_base_path']))
$_params['resource_base_path'] = $params['resource_base_path'];
if ($this->_parse_resource_name($_params)) {
$_resource_type = $_params['resource_type'];
$_resource_name = $_params['resource_name'];

View File

@@ -78,8 +78,9 @@ function smarty_core_read_cache_file(&$params, &$smarty)
}
if (isset($smarty->_cache_info['config'])) {
$_params = array('resource_base_path' => $smarty->config_dir);
foreach (array_keys($smarty->_cache_info['config']) as $_config_dep) {
$_params = array('resource_name' => $_config_dep);
$_params['resource_name'] = $_config_dep;
$smarty->_fetch_resource_info($_params);
if ($smarty->_cache_info['timestamp'] < $_params['resource_timestamp']) {
// config file has changed, regenerate cache