From 653475c489c435a0fd869116ed840b6f3a7f823b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 15 Jul 2023 08:58:56 +0200 Subject: [PATCH] Fix wrong order of a multi-folder search result when sorting by size (#9065) --- CHANGELOG.md | 1 + program/lib/Roundcube/rcube_imap_generic.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a48978b4ed0..6b5244aa622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Fix bug where a duplicate `` tag in HTML email could cause some parts being cut off (#9029) - Fix bug where a list of folders could have been sorted incorrectly (#9057) - Fix regression where LDAP addressbook 'filter' option was ignored (#9061) +- Fix wrong order of a multi-folder search result when sorting by size (#9065) ## Release 1.6.2 diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index 84bdb2b002d..918c024daa6 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -2769,7 +2769,7 @@ public static function sortHeaders($messages, $field, $order = 'ASC') $sort_order = $order == 'ASC' ? SORT_ASC : SORT_DESC; $sort_flags = SORT_STRING | SORT_FLAG_CASE; - if (in_array($field, ['arrival', 'date', 'internaldate', 'timestamp'])) { + if (in_array($field, ['arrival', 'date', 'internaldate', 'timestamp', 'size', 'uid', 'id'])) { $sort_flags = SORT_NUMERIC; }