alecpl
2010-05-06 9800a825e7a98d3bd857f168e697555259098932
program/steps/mail/func.inc
@@ -96,9 +96,6 @@
    
      $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
@@ -175,14 +172,10 @@
    $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']);
  
@@ -209,9 +202,6 @@
  
  $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');
  
@@ -483,7 +473,7 @@
function rcmail_get_messagecount_text($count=NULL, $page=NULL)
  {
  global $IMAP, $MESSAGE;
  global $RCMAIL, $IMAP, $MESSAGE;
  
  if (isset($MESSAGE->index))
    {
@@ -496,7 +486,11 @@
    $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');
@@ -1528,3 +1522,4 @@
));
?>