Fix arrival sorting when client sorting
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 27 Mar 2009 05:55:30 +0000 (23:55 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 27 Mar 2009 05:55:30 +0000 (23:55 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Socket.php

index ee1a677..bd0fdff 100644 (file)
@@ -1736,8 +1736,8 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base
                     /* There is no requirement that IDs be returned in
                      * sequence order (see RFC 4549 [4.3.1]). So we must sort
                      * ourselves. */
-                    $sorted = $slice;
-                    sort($sorted, SORT_NUMERIC);
+                    $sorted = array_flip($slice);
+                    ksort($sorted, SORT_NUMERIC);
                     break;
 
                 case Horde_Imap_Client::SORT_SIZE: