From 256624624048f56d50ccf50aaf8cdfa82915537e Mon Sep 17 00:00:00 2001 From: messju Date: Thu, 6 Nov 2003 16:53:39 +0000 Subject: [PATCH] added $exp_time-parameter of clear_cache() and clear_all_cache() to cache_handler_func. --- libs/Smarty.class.php | 5 +++-- libs/core/core.write_cache_file.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 9b185e15..d8c85589 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -993,7 +993,7 @@ class Smarty if (!empty($this->cache_handler_func)) { return call_user_func_array($this->cache_handler_func, - array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id)); + array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id, $exp_time)); } else { $_params = array('auto_base' => $this->cache_dir, 'auto_source' => $tpl_file, @@ -1015,8 +1015,9 @@ class Smarty function clear_all_cache($exp_time = null) { if (!empty($this->cache_handler_func)) { + $dummy = null; call_user_func_array($this->cache_handler_func, - array('clear', &$this, &$dummy)); + array('clear', &$this, &$dummy, null, null, null, $exp_time)); } else { $_params = array('auto_base' => $this->cache_dir, 'auto_source' => null, diff --git a/libs/core/core.write_cache_file.php b/libs/core/core.write_cache_file.php index 75d808ee..7429ad98 100644 --- a/libs/core/core.write_cache_file.php +++ b/libs/core/core.write_cache_file.php @@ -45,7 +45,7 @@ function smarty_core_write_cache_file($params, &$smarty) if (!empty($smarty->cache_handler_func)) { // use cache_handler function call_user_func_array($smarty->cache_handler_func, - array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'])); + array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null)); } else { // use local cache file