summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-03 08:41:37 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-03-03 08:41:37 +0000
commit7a22b59523cfe9e73b0cb27ff00d33102dff29f6 (patch)
tree1bd6bb6e7e57bb7a91da0860642ec55befe84bf0
parentbd9b428b574d0309c86cb30007834f4b2857467e (diff)
- fix order of messages added by check_recent
git-svn-id: https://svn.roundcube.net/trunk@3308 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/program/steps/mail/check_recent.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/roundcubemail/program/steps/mail/check_recent.inc b/roundcubemail/program/steps/mail/check_recent.inc
index caf8b8282..9bc9e6f92 100644
--- a/roundcubemail/program/steps/mail/check_recent.inc
+++ b/roundcubemail/program/steps/mail/check_recent.inc
@@ -62,8 +62,10 @@ foreach ($a_mailboxes as $mbox_name) {
$search_str .= ' '.$IMAP->search_string;
if ($IMAP->search($mbox_name, $search_str, NULL, 'date')) {
+ // revert sort order
+ $order = $_SESSION['sort_col'] == 'date' && $_SESSION['sort_order'] == 'DESC' ? 'ASC' : 'DESC';
// get the headers and add them to the list
- $result_h = $IMAP->list_headers($mbox_name, 1, 'date', 'DESC');
+ $result_h = $IMAP->list_headers($mbox_name, 1, 'date', $order);
rcmail_js_message_list($result_h, true, false);
}
}