From 04c61804f81a3ed839ef35e7fa70185f713498fd Mon Sep 17 00:00:00 2001 From: thomascube Date: Wed, 20 Dec 2006 14:27:47 +0000 Subject: Fixed wrong message listing when showing search results --- program/steps/mail/list.inc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'program/steps/mail/list.inc') diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc index b3ea08b28..9e3b38d57 100644 --- a/program/steps/mail/list.inc +++ b/program/steps/mail/list.inc @@ -40,20 +40,11 @@ else $sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col']; $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order']; } - -// we have a saved search request -if (!empty($_GET['_search']) && isset($_SESSION['search'][$_GET['_search']])) - { - $a_msgs = split(',', $_SESSION['search'][$_GET['_search']]); - $a_headers = $IMAP->list_header_set($mbox_name, $a_msgs, NULL, $sort_col, $sort_order); - $count = count($a_msgs); - } -else - { - if ($count = $IMAP->messagecount()) - $a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order); - } + +// fetch message headers +if ($count = $IMAP->messagecount()) + $a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order); $unseen = $IMAP->messagecount($mbox_name, 'UNSEEN', !empty($_GET['_refresh']) ? TRUE : FALSE); -- cgit v1.2.3