cvs: smarty /libs Smarty.class.php /libs/plugins core.read_cache_file.php core.smarty_include.php function.config_load.php
| From: | Messju Mohr | Date: | Mon, 12 May 2003 07:53:57 +0000 |
| Subject: | cvs: smarty /libs Smarty.class.php /libs/plugins core.read_cache_file.php core.smarty_include.php function.config_load.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-604@lists.php.net to get a copy of this message | ||
messju Mon May 12 03:53:57 2003 EDT
Modified files:
/smarty/libs Smarty.class.php
/smarty/libs/plugins core.read_cache_file.php
core.smarty_include.php
function.config_load.php
Log:
fixed multiple redundant occurrences for 'config' and 'template' in
$smarty->_cache_info
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.396 smarty/libs/Smarty.class.php:1.397
--- smarty/libs/Smarty.class.php:1.396 Thu May 8 16:21:16 2003
+++ smarty/libs/Smarty.class.php Mon May 12 03:53:57 2003
@@ -42,7 +42,7 @@
* @version 2.5.0
*/
-/* $Id: Smarty.class.php,v 1.396 2003/05/08 20:21:16 mohrt Exp $ */
+/* $Id: Smarty.class.php,v 1.397 2003/05/12 07:53:57 messju Exp $ */
/**
* DIR_SEP isn't used anymore, but third party apps might
@@ -1150,7 +1150,7 @@
'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 @@
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');
}
Index: smarty/libs/plugins/core.read_cache_file.php
diff -u smarty/libs/plugins/core.read_cache_file.php:1.1
smarty/libs/plugins/core.read_cache_file.php:1.2
--- smarty/libs/plugins/core.read_cache_file.php:1.1 Thu May 8 16:21:16 2003
+++ smarty/libs/plugins/core.read_cache_file.php Mon May 12 03:53:57 2003
@@ -68,7 +68,7 @@
}
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 @@
}
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;
Index: smarty/libs/plugins/core.smarty_include.php
diff -u smarty/libs/plugins/core.smarty_include.php:1.1
smarty/libs/plugins/core.smarty_include.php:1.2
--- smarty/libs/plugins/core.smarty_include.php:1.1 Thu May 8 16:21:16 2003
+++ smarty/libs/plugins/core.smarty_include.php Mon May 12 03:53:57 2003
@@ -49,7 +49,7 @@
}
if ($this->caching) {
- $this->_cache_info['template'][] =
$params['smarty_include_tpl_file'];
+ $this->_cache_info['template'][$params['smarty_include_tpl_file']] =
true;
}
}
Index: smarty/libs/plugins/function.config_load.php
diff -u smarty/libs/plugins/function.config_load.php:1.5
smarty/libs/plugins/function.config_load.php:1.6
--- smarty/libs/plugins/function.config_load.php:1.5 Thu May 8 16:21:16 2003
+++ smarty/libs/plugins/function.config_load.php Mon May 12 03:53:57 2003
@@ -105,7 +105,7 @@
}
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);