From 04c61804f81a3ed839ef35e7fa70185f713498fd Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Wed, 20 Dec 2006 09:27:47 -0500 Subject: [PATCH] Fixed wrong message listing when showing search results --- program/steps/mail/list.inc | 17 ++++------------- 1 files changed, 4 insertions(+), 13 deletions(-) diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc index b3ea08b..9e3b38d 100644 --- a/program/steps/mail/list.inc +++ b/program/steps/mail/list.inc @@ -40,20 +40,11 @@ $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); -- Gitblit v1.9.1