# HG changeset patch # User Charlie Root # Date 1516198624 18000 # Node ID bb8aca0e35ee415f8ba8c33334144d2375711f99 # Parent 0cac1d1e799f92d11c9854350b661dfddec8d94e don't break when sorting dates diff -r 0cac1d1e799f -r bb8aca0e35ee program/steps/mail/list.inc --- 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']