From a8282f1359a447f22ced217aa18bb5b9d857f3d9 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 11 Jul 2014 09:28:36 +0200 Subject: Fix sorting messages by size on servers without SORT capability (#1489981) --- CHANGELOG | 1 + program/lib/Roundcube/rcube_imap_generic.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7553b68d6..e5aa054bc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,6 +22,7 @@ CHANGELOG Roundcube Webmail - Fix Delete button state after deleting identity/response (#1489972) - Fix bug where contacts with no email address were listed on compose addressbook (#1489970) - Fix images import from various vCard formats (#1489977) +- Fix sorting messages by size on servers without SORT capability (#1489981) RELEASE 1.0.1 ------------- diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index 4cb61e95d..709433041 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -1854,8 +1854,8 @@ class rcube_imap_generic $result[$id] = ''; } } else if ($mode == 2) { - if (preg_match('/(UID|RFC822\.SIZE) ([0-9]+)/', $line, $matches)) { - $result[$id] = trim($matches[2]); + if (preg_match('/' . $index_field . ' ([0-9]+)/', $line, $matches)) { + $result[$id] = trim($matches[1]); } else { $result[$id] = 0; } -- cgit v1.2.3