thomascube
2008-07-25 6d5dbae53cd4b4b97da0b0c558292a7f1062a524
program/steps/mail/list.inc
@@ -5,7 +5,7 @@
 | program/steps/mail/list.inc                                           |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005, RoundCube Dev. - Switzerland                      |
 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -40,9 +40,10 @@
$mbox_name = $IMAP->get_mailbox_name();
// fetch message headers
if ($count = $IMAP->messagecount($mbox_name, 'ALL', !empty($_REQUEST['_refresh'])))
if ($IMAP->messagecount($mbox_name, 'ALL', !empty($_REQUEST['_refresh'])))
  $a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order);
$count = $IMAP->messagecount($mbox_name);
$unseen = $IMAP->messagecount($mbox_name, 'UNSEEN', !empty($_REQUEST['_refresh']));
// update message count display
@@ -51,9 +52,6 @@
$OUTPUT->set_env('pagecount', $pages);
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count));
// update mailboxlist
$OUTPUT->command('set_unread_count', $mbox_name, $unseen);
// add message rows
if (isset($a_headers) && count($a_headers))
@@ -61,7 +59,10 @@
else
  $OUTPUT->show_message('nomessagesfound', 'notice');
  
// update mailboxlist
$OUTPUT->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX'));
// send response
$OUTPUT->send();
?>
?>