diff options
author | Alex Bilbie <alex@alexbilbie.com> | 2012-09-05 11:25:46 +0200 |
---|---|---|
committer | Alex Bilbie <alex@alexbilbie.com> | 2012-09-05 11:25:46 +0200 |
commit | c8aa98f780597cd935d16e683c234de9c73a52b7 (patch) | |
tree | c6e2fa6c4090e6e700f74739bccb9b93e0dd8e81 /system/libraries/Session | |
parent | 31d38f202bcfcc11e871e1707627c06e3ce8c40a (diff) | |
parent | cd436e92ec5f9a5d0361fb186bccacb908dbea22 (diff) |
Merge pull request #1770 from dchill42/session
Session Fixes for #1711 and #1756
Diffstat (limited to 'system/libraries/Session')
-rwxr-xr-x | system/libraries/Session/drivers/Session_cookie.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/system/libraries/Session/drivers/Session_cookie.php b/system/libraries/Session/drivers/Session_cookie.php index 69e5fde14..52eeddbc4 100755 --- a/system/libraries/Session/drivers/Session_cookie.php +++ b/system/libraries/Session/drivers/Session_cookie.php @@ -309,6 +309,7 @@ class CI_Session_cookie extends CI_Session_driver { if ($this->sess_use_database === TRUE && isset($this->userdata['session_id'])) { $this->CI->db->delete($this->sess_table_name, array('session_id' => $this->userdata['session_id'])); + $this->data_dirty = FALSE; } // Kill the cookie @@ -443,8 +444,19 @@ class CI_Session_cookie extends CI_Session_driver { $this->CI->db->where('user_agent', $session['user_agent']); } + // Is caching in effect? Turn it off + $db_cache = $this->CI->db->cache_on; + $this->CI->db->cache_off(); + $query = $this->CI->db->limit(1)->get($this->sess_table_name); + // Was caching in effect? + if ($db_cache) + { + // Turn it back on + $this->CI->db->cache_on(); + } + // No result? Kill it! if ($query->num_rows() === 0) { |