From 79f491971a1303733bdf004f2fe18ac50ca07672 Mon Sep 17 00:00:00 2001 From: messju Date: Thu, 14 Aug 2003 16:44:03 +0000 Subject: [PATCH] fixed timestamp-check of config-files in smarty_core_read_cache_file() --- libs/Smarty.class.php | 3 +++ libs/core/core.read_cache_file.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 253664d2..2b39b111 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -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']; diff --git a/libs/core/core.read_cache_file.php b/libs/core/core.read_cache_file.php index e98b463e..6db65d56 100644 --- a/libs/core/core.read_cache_file.php +++ b/libs/core/core.read_cache_file.php @@ -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