From dcf780a6bd5065ffb0dcc76233b1e5f601e258d2 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Sat, 22 Nov 2008 13:06:13 -0500 Subject: [PATCH] - 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 --- program/include/rcube_imap.php | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index c3d5991..6826869 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -2146,11 +2146,10 @@ { $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 @@ { $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 @@ $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, -- Gitblit v1.9.1