diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-11-22 18:06:13 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-11-22 18:06:13 +0000 |
| commit | daed092b293e227909e29f5b7aad7c9aa38d47ac (patch) | |
| tree | 9d351ce7073c892b0b2ac6704d2091b7a668c1f4 /roundcubemail/program/include/rcube_imap.php | |
| parent | e00d46500c4740745ef34e70f5db783fae0a291c (diff) | |
- fix r2076: removed cache.session_id column, removed DELETEs from cache in session_gc
- trust DB server's time when "touching" cache and messages tables
git-svn-id: https://svn.roundcube.net/trunk@2077 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_imap.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index c3d599180..682686973 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -2146,11 +2146,10 @@ class rcube_imap { $this->db->query( "UPDATE ".get_table_name('cache')." - SET created=". $this->db->fromunixtime(time()).", data=?, session_id=? + SET created=". $this->db->now().", data=? WHERE user_id=? AND cache_key=?", $data, - session_id(), $_SESSION['user_id'], $key); } @@ -2159,12 +2158,11 @@ class rcube_imap { $this->db->query( "INSERT INTO ".get_table_name('cache')." - (created, user_id, cache_key, data, session_id) - VALUES (".$this->db->fromunixtime(time()).", ?, ?, ?, ?)", + (created, user_id, cache_key, data) + VALUES (".$this->db->now().", ?, ?, ?)", $_SESSION['user_id'], $key, - $data, - session_id()); + $data); } } @@ -2374,7 +2372,7 @@ class rcube_imap $this->db->query( "INSERT INTO ".get_table_name('messages')." (user_id, del, cache_key, created, idx, uid, subject, ".$this->db->quoteIdentifier('from').", ".$this->db->quoteIdentifier('to').", cc, date, size, headers, structure) - VALUES (?, 0, ?, ".$this->db->fromunixtime(time()).", ?, ?, ?, ?, ?, ?, ".$this->db->fromunixtime($headers->timestamp).", ?, ?, ?)", + VALUES (?, 0, ?, ".$this->db->now().", ?, ?, ?, ?, ?, ?, ".$this->db->fromunixtime($headers->timestamp).", ?, ?, ?)", $_SESSION['user_id'], $key, $index, |
