Skip to content

Commit

Permalink
Fix wrong order of a multi-folder search result when sorting by size (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jul 15, 2023
1 parent 5454c53 commit 653475c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Fix bug where a duplicate `<title>` 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

Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube_imap_generic.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 653475c

Please sign in to comment.