added $exp_time-parameter of clear_cache() and clear_all_cache() to

cache_handler_func.
This commit is contained in:
messju
2003-11-06 16:53:39 +00:00
parent ee5d31238e
commit 2566246240
2 changed files with 4 additions and 3 deletions

View File

@@ -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,

View File

@@ -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