From a8a702511db46d2a02b0baf8f5df642b87020a88 Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 29 Jul 2003 23:54:49 +0000 Subject: [PATCH] Same story as THREAD fix. Skip the unsollicited responses git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5476 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_messages.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/imap_messages.php b/functions/imap_messages.php index 20942573..97b2812f 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -181,9 +181,12 @@ function sqimap_get_sort_order ($imap_stream, $sort, $mbxresponse) { $sort_test = sqimap_run_command ($imap_stream, $query, true, $response, $message, $uid_support); } if (isset($sort_test[0])) { - if (preg_match("/^\* SORT (.+)$/", $sort_test[0], $regs)) { + for ($i=0,$iCnt=count($sort_test);$i<$iCnt;++$i) { + if (preg_match("/^\* SORT (.+)$/", $sort_test[$i], $regs)) { $server_sort_array = preg_split("/ /", trim($regs[1])); + break; } + } } if ($sort == 0 || $sort == 2 || $sort == 4) { $server_sort_array = array_reverse($server_sort_array); -- 2.25.1