mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
fixed timestamp-check of config-files in smarty_core_read_cache_file()
This commit is contained in:
@@ -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'];
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user