| | |
| | | |
| | | $search_mods = $RCMAIL->config->get('search_mods', $SEARCH_MODS_DEFAULT); |
| | | $OUTPUT->set_env('search_mods', $search_mods); |
| | | |
| | | // make sure the message count is refreshed (for default view) |
| | | $IMAP->messagecount($mbox_name, $IMAP->threading ? 'THREADS' : 'ALL', true); |
| | | } |
| | | |
| | | // set current mailbox and some other vars in client environment |
| | |
| | | $a_show_cols[$f] = 'to'; |
| | | |
| | | $skin_path = $_SESSION['skin_path'] = $CONFIG['skin_path']; |
| | | $message_count = $IMAP->messagecount(NULL, $IMAP->threading ? 'THREADS' : 'ALL'); |
| | | |
| | | // set client env |
| | | $OUTPUT->add_gui_object('messagelist', $attrib['id']); |
| | | $OUTPUT->set_env('autoexpand_threads', intval($CONFIG['autoexpand_threads'])); |
| | | $OUTPUT->set_env('messagecount', $message_count); |
| | | $OUTPUT->set_env('current_page', $IMAP->list_page); |
| | | $OUTPUT->set_env('pagecount', ceil($message_count/$IMAP->page_size)); |
| | | $OUTPUT->set_env('sort_col', $_SESSION['sort_col']); |
| | | $OUTPUT->set_env('sort_order', $_SESSION['sort_order']); |
| | | |
| | |
| | | |
| | | $OUTPUT->set_env('messages', array()); |
| | | $OUTPUT->set_env('coltypes', $a_show_cols); |
| | | |
| | | if (!$message_count) |
| | | $OUTPUT->show_message('nomessagesfound', 'notice'); |
| | | |
| | | $OUTPUT->include_script('list.js'); |
| | | |
| | |
| | | |
| | | function rcmail_get_messagecount_text($count=NULL, $page=NULL) |
| | | { |
| | | global $IMAP, $MESSAGE; |
| | | global $RCMAIL, $IMAP, $MESSAGE; |
| | | |
| | | if (isset($MESSAGE->index)) |
| | | { |
| | |
| | | $page = $IMAP->list_page; |
| | | |
| | | $start_msg = ($page-1) * $IMAP->page_size + 1; |
| | | $max = $count!==NULL ? $count : $IMAP->messagecount(NULL, $IMAP->threading ? 'THREADS' : 'ALL'); |
| | | |
| | | if ($count!==NULL) |
| | | $max = $count; |
| | | else if ($RCMAIL->action) |
| | | $max = $IMAP->messagecount(NULL, $IMAP->threading ? 'THREADS' : 'ALL'); |
| | | |
| | | if ($max==0) |
| | | $out = rcube_label('mailboxempty'); |
| | |
| | | )); |
| | | |
| | | ?> |
| | | |