diff options
author | admin <devnull@localhost> | 2006-10-06 03:50:43 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-06 03:50:43 +0200 |
commit | e6419c4eeed88280a3e59851987e202f4c614dad (patch) | |
tree | a76aefbdced1e29c7f204a19ad3143dcdfae6af6 | |
parent | a658e314697e0b9e529a73df25edf4fffaf2b519 (diff) |
-rw-r--r-- | system/database/DB_cache.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index 344736c24..913140f6c 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -159,12 +159,19 @@ class CI_DB_Cache { * @access public * @return bool */ - function delete() - { - $uri = ($this->obj->uri->segment(1) == FALSE) ? 'base' : $this->obj->uri->segment(2); - $uri .= ($this->obj->uri->segment(2) == FALSE) ? 'index' : $this->obj->uri->segment(2); + function delete($segment_one = '', $segment_two = '') + { + if ($segment_one == '') + { + $segment_one = ($this->obj->uri->segment(1) == FALSE) ? 'default' : $this->obj->uri->segment(2); + } + + if ($segment_two == '') + { + $segment_two = ($this->obj->uri->segment(2) == FALSE) ? 'index' : $this->obj->uri->segment(2); + } - $dir_path = $this->obj->db->cachedir.md5($uri).'/'; + $dir_path = $this->obj->db->cachedir.md5($segment_one.'_'.$segment_two).'/'; delete_files($dir_path, TRUE); } |