diff options
author | thomascube <thomas@roundcube.net> | 2006-01-23 23:12:23 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2006-01-23 23:12:23 +0000 |
commit | 0677ca5a1e745643a9142081c4cbb7ea13e5a2e5 (patch) | |
tree | 6cd391bc31a99ad91784e79d120197e0c9f301d2 /program/include | |
parent | 583672fb48055a0e16ed573a4a64519d2a1b6645 (diff) |
Add created date to message cache
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcube_imap.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index 4bce34b4f..7f91d3a65 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -657,7 +657,7 @@ class rcube_imap // cache is OK if ($cache_status>0) { - $a_index = $this->get_message_cache_index($cache_key, FALSE, $this->sort_field); + $a_index = $this->get_message_cache_index($cache_key, TRUE, $this->sort_field, $this->sort_order); return array_values($a_index); } @@ -1410,7 +1410,7 @@ class rcube_imap } - function get_message_cache_index($key, $force=FALSE, $sort_col='idx') + function get_message_cache_index($key, $force=FALSE, $sort_col='idx', $sort_order='ASC') { static $sa_message_index = array(); @@ -1423,7 +1423,7 @@ class rcube_imap FROM ".get_table_name('messages')." WHERE user_id=? AND cache_key=? - ORDER BY ".$sort_col." ASC", + ORDER BY ".$this->db->quote_identifier($sort_col)." ".$sort_order, $_SESSION['user_id'], $key); @@ -1441,8 +1441,8 @@ class rcube_imap $this->db->query( "INSERT INTO ".get_table_name('messages')." - (user_id, del, cache_key, idx, uid, subject, ".$this->db->quoteIdentifier('from').", ".$this->db->quoteIdentifier('to').", cc, date, size, headers) - VALUES (?, 0, ?, ?, ?, ?, ?, ?, ?, ".$this->db->fromunixtime($headers->timestamp).", ?, ?)", + (user_id, del, cache_key, created, idx, uid, subject, ".$this->db->quoteIdentifier('from').", ".$this->db->quoteIdentifier('to').", cc, date, size, headers) + VALUES (?, 0, ?, now(), ?, ?, ?, ?, ?, ?, ".$this->db->fromunixtime($headers->timestamp).", ?, ?)", $_SESSION['user_id'], $key, $index, |