mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
fixed multiple redundant occurrences for 'config' and 'template' in
$smarty->_cache_info
This commit is contained in:
@@ -1150,7 +1150,7 @@ class Smarty
|
||||
'tpl_file' => $tpl_file,
|
||||
'cache_id' => $cache_id,
|
||||
'compile_id' => $compile_id,
|
||||
'results' => $_smarty_results
|
||||
'results' => null
|
||||
);
|
||||
if ($this->_execute_core_function('read_cache_file', $_params)) {
|
||||
$_smarty_results = $_params['results'];
|
||||
@@ -1192,7 +1192,7 @@ class Smarty
|
||||
return $_smarty_results;
|
||||
}
|
||||
} else {
|
||||
$this->_cache_info['template'][] = $tpl_file;
|
||||
$this->_cache_info['template'][$tpl_file] = true;
|
||||
if ($this->cache_modified_check) {
|
||||
header("Last-Modified: ".gmdate('D, d M Y H:i:s', time()).' GMT');
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ function smarty_core_read_cache_file(&$params, &$this)
|
||||
}
|
||||
|
||||
if ($this->compile_check) {
|
||||
foreach ($this->_cache_info['template'] as $_template_dep) {
|
||||
foreach (array_keys($this->_cache_info['template']) as $_template_dep) {
|
||||
$_params = array('tpl_path' => $_template_dep);
|
||||
$this->_execute_core_function('fetch_template_info', $_params);
|
||||
if ($this->_cache_info['timestamp'] < $_params['template_timestamp']) {
|
||||
@@ -78,7 +78,7 @@ function smarty_core_read_cache_file(&$params, &$this)
|
||||
}
|
||||
|
||||
if (isset($this->_cache_info['config'])) {
|
||||
foreach ($this->_cache_info['config'] as $config_dep) {
|
||||
foreach (array_keys($this->_cache_info['config']) as $config_dep) {
|
||||
if ($this->_cache_info['timestamp'] < filemtime($this->config_dir . DIRECTORY_SEPARATOR . $config_dep)) {
|
||||
// config file has changed, regenerate cache
|
||||
return false;
|
||||
|
@@ -49,7 +49,7 @@ function smarty_core_smarty_include($params, &$this)
|
||||
}
|
||||
|
||||
if ($this->caching) {
|
||||
$this->_cache_info['template'][] = $params['smarty_include_tpl_file'];
|
||||
$this->_cache_info['template'][$params['smarty_include_tpl_file']] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -105,7 +105,7 @@ function smarty_function_config_load($params, &$smarty)
|
||||
}
|
||||
|
||||
if ($smarty->caching) {
|
||||
$smarty->_cache_info['config'][] = $_file;
|
||||
$smarty->_cache_info['config'][$_file] = true;
|
||||
}
|
||||
|
||||
$smarty->_config[0]['vars'] = @array_merge($smarty->_config[0]['vars'], $_config_vars);
|
||||
|
Reference in New Issue
Block a user