summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-06 03:50:43 +0200
committeradmin <devnull@localhost>2006-10-06 03:50:43 +0200
commite6419c4eeed88280a3e59851987e202f4c614dad (patch)
treea76aefbdced1e29c7f204a19ad3143dcdfae6af6
parenta658e314697e0b9e529a73df25edf4fffaf2b519 (diff)
-rw-r--r--system/database/DB_cache.php17
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);
}