alecpl
2010-09-25 e019f2d0f2dc2fbfa345ab5d7ae85e67bfdd76b8
program/steps/mail/list.inc
@@ -4,8 +4,8 @@
 +-----------------------------------------------------------------------+
 | program/steps/mail/list.inc                                           |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2005-2007, Roundcube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 | PURPOSE:                                                              |
@@ -48,7 +48,7 @@
  $save_arr['list_cols'] = explode(',', $cols);
}
if ($save_arr)
if ($save_arr)
  $RCMAIL->user->save_prefs($save_arr);
$mbox_name = $IMAP->get_mailbox_name();
@@ -70,20 +70,25 @@
if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']]))
  $_SESSION['search'][$_REQUEST['_search']] = $IMAP->get_search_set();
// empty result? we'll skip UNSEEN counting in rcmail_send_unread_count()
if (empty($search_request) && empty($a_headers)) {
    $unseen = 0;
}
// update mailboxlist
rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']));
rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']), $unseen);
// update message count display
$pages = ceil($count/$IMAP->page_size);
$OUTPUT->set_env('messagecount', $count);
$OUTPUT->set_env('pagecount', $pages);
$OUTPUT->set_env('threading', (bool) $IMAP->threading);
$OUTPUT->set_env('current_page', $IMAP->list_page);
$OUTPUT->set_env('current_page', $count ? $IMAP->list_page : 1);
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count));
$OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text());
// add message rows
rcmail_js_message_list($a_headers, FALSE, TRUE, (bool) $cols);
rcmail_js_message_list($a_headers, FALSE, $cols);
if (isset($a_headers) && count($a_headers))
{
  if ($search_request)
@@ -97,5 +102,4 @@
// send response
$OUTPUT->send();
?>