changeset 3:bb8aca0e35ee

don't break when sorting dates
author Charlie Root
date Wed, 17 Jan 2018 09:17:04 -0500
parents 0cac1d1e799f
children 1ab920879b88
files program/steps/mail/list.inc
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/program/steps/mail/list.inc	Tue Jan 16 17:54:18 2018 -0500
+++ b/program/steps/mail/list.inc	Wed Jan 17 09:17:04 2018 -0500
@@ -67,9 +67,10 @@
 
 // fetch message headers
 if ($count = $RCMAIL->storage->count($mbox_name, $threading ? 'THREADS' : 'ALL', !empty($_REQUEST['_refresh']))) {
-    $a_headers = $RCMAIL->storage->list_messages($mbox_name, NULL, rcmail_sort_column(), rcmail_sort_order());
+  $sort_col = rcmail_sort_column();
+  $a_headers = $RCMAIL->storage->list_messages($mbox_name, NULL,($sort_col == 'dates')? NULL : $sort_col , rcmail_sort_order());
 }
-
+#rcube::write_log('mail',"list fetch: $count ".count($a_headers));
 // update search set (possible change of threading mode)
 if (!empty($_REQUEST['_search']) && isset($_SESSION['search'])
     && $_SESSION['search_request'] == $_REQUEST['_search']