summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-07-11 09:28:36 +0200
committerAleksander Machniak <alec@alec.pl>2014-07-11 09:29:21 +0200
commita8282f1359a447f22ced217aa18bb5b9d857f3d9 (patch)
tree7fc522fea30b222898c02b2650af82359f9ff87d /program
parent86fe5378ae83593b4e674456a471955e504df6d0 (diff)
Fix sorting messages by size on servers without SORT capability (#1489981)
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/rcube_imap_generic.php4
1 files changed, 2 insertions, 2 deletions
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;
}