comparison program/steps/mail/list.inc @ 3:bb8aca0e35ee

don't break when sorting dates
author Charlie Root
date Wed, 17 Jan 2018 09:17:04 -0500
parents 4681f974d28b
children 1ab920879b88
comparison
equal deleted inserted replaced
2:0cac1d1e799f 3:bb8aca0e35ee
65 // Synchronize mailbox cache, handle flag changes 65 // Synchronize mailbox cache, handle flag changes
66 $RCMAIL->storage->folder_sync($mbox_name); 66 $RCMAIL->storage->folder_sync($mbox_name);
67 67
68 // fetch message headers 68 // fetch message headers
69 if ($count = $RCMAIL->storage->count($mbox_name, $threading ? 'THREADS' : 'ALL', !empty($_REQUEST['_refresh']))) { 69 if ($count = $RCMAIL->storage->count($mbox_name, $threading ? 'THREADS' : 'ALL', !empty($_REQUEST['_refresh']))) {
70 $a_headers = $RCMAIL->storage->list_messages($mbox_name, NULL, rcmail_sort_column(), rcmail_sort_order()); 70 $sort_col = rcmail_sort_column();
71 $a_headers = $RCMAIL->storage->list_messages($mbox_name, NULL,($sort_col == 'dates')? NULL : $sort_col , rcmail_sort_order());
71 } 72 }
72 73 #rcube::write_log('mail',"list fetch: $count ".count($a_headers));
73 // update search set (possible change of threading mode) 74 // update search set (possible change of threading mode)
74 if (!empty($_REQUEST['_search']) && isset($_SESSION['search']) 75 if (!empty($_REQUEST['_search']) && isset($_SESSION['search'])
75 && $_SESSION['search_request'] == $_REQUEST['_search'] 76 && $_SESSION['search_request'] == $_REQUEST['_search']
76 ) { 77 ) {
77 $search_request = $_REQUEST['_search']; 78 $search_request = $_REQUEST['_search'];