diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-17 06:57:16 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-17 06:57:16 +0200 |
commit | e5ff3dcd795f8a9a27e8c2026a93571e65a5961d (patch) | |
tree | bbf8f703f116b03d27a7adb8049aeda2152e9618 /system | |
parent | 5e189cc5bf2081a54474262e06d0add8d5ed389c (diff) |
Fixed a bug (4718) in which the path to the files was being set in correctly.
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_cache.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php index ecb2b13a1..9bb1b165b 100644 --- a/system/database/DB_cache.php +++ b/system/database/DB_cache.php @@ -93,13 +93,14 @@ class CI_DB_Cache { {
return $this->db->cache_off();
}
-
- $uri = ($this->CI->uri->segment(1) == FALSE) ? 'default.' : $this->CI->uri->segment(1).'+';
- $uri .= ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
+
+ $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1);
- $filepath = $uri.'/'.md5($sql);
+ $segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
+
+ $filepath = $this->db->cachedir.$segment_one.'+'.$segment_two.'/'.md5($sql);
- if (FALSE === ($cachedata = read_file($this->db->cachedir.$filepath)))
+ if (FALSE === ($cachedata = read_file($filepath)))
{
return FALSE;
}
@@ -122,10 +123,11 @@ class CI_DB_Cache { return $this->db->cache_off();
}
- $uri = ($this->CI->uri->segment(1) == FALSE) ? 'default.' : $this->CI->uri->segment(1).'+';
- $uri .= ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
+ $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1);
- $dir_path = $this->db->cachedir.$uri.'/';
+ $segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
+
+ $dir_path = $this->db->cachedir.$segment_one.'+'.$segment_two.'/';
$filename = md5($sql);
|