From eddaf0b5f68c9863181b62db33bc468d38071e8a Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Thu, 10 Apr 2014 02:41:34 -0400 Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail --- program/lib/Roundcube/rcube_imap.php | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 23cacd4..5c30327 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -988,6 +988,10 @@ $a_msg_headers = array_slice(array_values($a_msg_headers), $from, $slice_length); } else { + if ($this->sort_order != $search_set->get_parameters('ORDER')) { + $search_set->revert(); + } + // slice resultset first... $fetch = array(); foreach (array_slice($search_set->get(), $from, $slice_length) as $msg_id) { @@ -1708,7 +1712,7 @@ } // decode combined UID-folder identifier - if (preg_match('/^\d+-[^,]+$/', $uid)) { + if (preg_match('/^\d+-.+/', $uid)) { list($uid, $folder) = explode('-', $uid, 2); } @@ -1744,7 +1748,7 @@ } // decode combined UID-folder identifier - if (preg_match('/^\d+-[^,]+$/', $uid)) { + if (preg_match('/^\d+-.+/', $uid)) { list($uid, $folder) = explode('-', $uid, 2); } -- Gitblit v1.9.1