From 6be039a1293890259778a5f1addca4a429603580 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 5 Dec 2008 14:18:11 -0700 Subject: [PATCH] Fix thread sorting when a UID is out of order. --- imp/lib/IMAP/Thread.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/imp/lib/IMAP/Thread.php b/imp/lib/IMAP/Thread.php index 760f305a6..14e73cf9a 100644 --- a/imp/lib/IMAP/Thread.php +++ b/imp/lib/IMAP/Thread.php @@ -60,9 +60,7 @@ class IMP_IMAP_Thread $thread_level = $tree = array(); $t = &$this->_thread; - if ($sortdir) { - $indices = array_reverse($indices); - } + $indices = array_intersect($t->messageList($sortdir), $indices); /* If starting in the middle of a thread, the threadLevel tree needs * to be built from the base of the current thread. */ -- 2.11.0