Ignore:
Timestamp:
Dec 7, 2011 5:41:15 AM (18 months ago)
Author:
alec
Message:
  • Remove deprecated global $IMAP variable usage (#1488148)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/mail/list.inc

    r5266 r5563  
    5252  $RCMAIL->user->save_prefs($save_arr); 
    5353 
    54 $mbox_name = $IMAP->get_mailbox_name(); 
     54$mbox_name = $RCMAIL->imap->get_mailbox_name(); 
    5555 
    5656// Synchronize mailbox cache, handle flag changes 
    57 $IMAP->mailbox_sync($mbox_name); 
     57$RCMAIL->imap->mailbox_sync($mbox_name); 
    5858 
    5959// initialize searching result if search_filter is used 
     
    6161{ 
    6262  $search_request = md5($mbox_name.$_SESSION['search_filter']); 
    63   $IMAP->search($mbox_name, $_SESSION['search_filter'], RCMAIL_CHARSET, $sort_col); 
    64   $_SESSION['search'] = $IMAP->get_search_set(); 
     63  $RCMAIL->imap->search($mbox_name, $_SESSION['search_filter'], RCMAIL_CHARSET, $sort_col); 
     64  $_SESSION['search'] = $RCMAIL->imap->get_search_set(); 
    6565  $_SESSION['search_request'] = $search_request; 
    6666  $OUTPUT->set_env('search_request', $search_request); 
     
    6868 
    6969// fetch message headers 
    70 if ($count = $IMAP->messagecount($mbox_name, $IMAP->threading ? 'THREADS' : 'ALL', !empty($_REQUEST['_refresh']))) 
    71   $a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order); 
     70if ($count = $RCMAIL->imap->messagecount($mbox_name, $RCMAIL->imap->threading ? 'THREADS' : 'ALL', !empty($_REQUEST['_refresh']))) 
     71  $a_headers = $RCMAIL->imap->list_headers($mbox_name, NULL, $sort_col, $sort_order); 
    7272 
    7373// update search set (possible change of threading mode) 
     
    7575    && $_SESSION['search_request'] == $_REQUEST['_search'] 
    7676) { 
    77   $_SESSION['search'] = $IMAP->get_search_set(); 
     77  $_SESSION['search'] = $RCMAIL->imap->get_search_set(); 
    7878} 
    7979// remove old search data 
     
    9292 
    9393// update message count display 
    94 $pages = ceil($count/$IMAP->page_size); 
     94$pages = ceil($count/$RCMAIL->imap->page_size); 
    9595$OUTPUT->set_env('messagecount', $count); 
    9696$OUTPUT->set_env('pagecount', $pages); 
    97 $OUTPUT->set_env('threading', (bool) $IMAP->threading); 
    98 $OUTPUT->set_env('current_page', $count ? $IMAP->list_page : 1); 
     97$OUTPUT->set_env('threading', (bool) $RCMAIL->imap->threading); 
     98$OUTPUT->set_env('current_page', $count ? $RCMAIL->imap->list_page : 1); 
    9999$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count), $mbox_name); 
    100100$OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text()); 
     
    109109else { 
    110110  // handle IMAP errors (e.g. #1486905) 
    111   if ($err_code = $IMAP->get_error_code()) { 
     111  if ($err_code = $RCMAIL->imap->get_error_code()) { 
    112112    rcmail_display_server_error(); 
    113113  } 
Note: See TracChangeset for help on using the changeset viewer.