summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authorroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-01-23 23:12:23 +0000
committerroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-01-23 23:12:23 +0000
commit119efcdaacfc66430505a3d6df546cb39b9471c8 (patch)
treefcf04c9b04b45ecf20a91491a5c89141aa938a31 /roundcubemail/program/include
parent3a705e3798db0bc645c4c7fee75cc75172ce6ac8 (diff)
Add created date to message cache
git-svn-id: https://svn.roundcube.net/trunk@121 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/rcube_imap.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/roundcubemail/program/include/rcube_imap.inc b/roundcubemail/program/include/rcube_imap.inc
index 4bce34b4f..7f91d3a65 100644
--- a/roundcubemail/program/include/rcube_imap.inc
+++ b/roundcubemail/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,