diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-12-07 10:41:15 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-12-07 10:41:15 +0000 |
| commit | ea3d91249609d60de8ea570b2f7694fc283a175c (patch) | |
| tree | bec327a12af45080ff03ed46cc7d665563af1aec /roundcubemail/program/steps/mail/check_recent.inc | |
| parent | 34e371d586aa6fb180cb799a541d4fdf57925df4 (diff) | |
- Remove deprecated global $IMAP variable usage (#1488148)
git-svn-id: https://svn.roundcube.net/trunk@5563 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/check_recent.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/check_recent.inc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/roundcubemail/program/steps/mail/check_recent.inc b/roundcubemail/program/steps/mail/check_recent.inc index ab0d3c818..498bf0ce1 100644 --- a/roundcubemail/program/steps/mail/check_recent.inc +++ b/roundcubemail/program/steps/mail/check_recent.inc @@ -19,12 +19,12 @@ */ -$current = $IMAP->get_mailbox_name(); +$current = $RCMAIL->imap->get_mailbox_name(); $check_all = !empty($_GET['_refresh']) || (bool)$RCMAIL->config->get('check_all_folders'); // list of folders to check if ($check_all) { - $a_mailboxes = $IMAP->list_mailboxes('', '*', 'mail'); + $a_mailboxes = $RCMAIL->imap->list_mailboxes('', '*', 'mail'); } else { $a_mailboxes = (array) $current; @@ -37,11 +37,11 @@ foreach ($a_mailboxes as $mbox_name) { $is_current = $mbox_name == $current; if ($is_current) { // Synchronize mailbox cache, handle flag changes - $IMAP->mailbox_sync($mbox_name); + $RCMAIL->imap->mailbox_sync($mbox_name); } // Get mailbox status - $status = $IMAP->mailbox_status($mbox_name); + $status = $RCMAIL->imap->mailbox_status($mbox_name); if ($status & 1) { // trigger plugin hook @@ -58,7 +58,7 @@ foreach ($a_mailboxes as $mbox_name) { if ($search_request && isset($_SESSION['search']) && $_SESSION['search_request'] == $search_request ) { - $_SESSION['search'] = $IMAP->refresh_search(); + $_SESSION['search'] = $RCMAIL->imap->refresh_search(); } if (!empty($_GET['_quota'])) @@ -69,27 +69,27 @@ foreach ($a_mailboxes as $mbox_name) { continue; // get overall message count; allow caching because rcube_imap::mailbox_status() did a refresh - $all_count = $IMAP->messagecount(null, $IMAP->threading ? 'THREADS' : 'ALL'); + $all_count = $RCMAIL->imap->messagecount(null, $RCMAIL->imap->threading ? 'THREADS' : 'ALL'); // check current page if we're not on the first page - if ($all_count && $IMAP->list_page > 1) { - $remaining = $all_count - $IMAP->page_size * ($IMAP->list_page - 1); + if ($all_count && $RCMAIL->imap->list_page > 1) { + $remaining = $all_count - $RCMAIL->imap->page_size * ($RCMAIL->imap->list_page - 1); if ($remaining <= 0) { - $IMAP->set_page($IMAP->list_page-1); - $_SESSION['page'] = $IMAP->list_page; + $RCMAIL->imap->set_page($RCMAIL->imap->list_page-1); + $_SESSION['page'] = $RCMAIL->imap->list_page; } } $OUTPUT->set_env('messagecount', $all_count); - $OUTPUT->set_env('pagecount', ceil($all_count/$IMAP->page_size)); + $OUTPUT->set_env('pagecount', ceil($all_count/$RCMAIL->imap->page_size)); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($all_count), $mbox_name); - $OUTPUT->set_env('current_page', $all_count ? $IMAP->list_page : 1); + $OUTPUT->set_env('current_page', $all_count ? $RCMAIL->imap->list_page : 1); // remove old rows (and clear selection if new list is empty) $OUTPUT->command('message_list.clear', $all_count ? false : true); if ($all_count) { - $a_headers = $IMAP->list_headers($mbox_name, null, $_SESSION['sort_col'], $_SESSION['sort_order']); + $a_headers = $RCMAIL->imap->list_headers($mbox_name, null, $_SESSION['sort_col'], $_SESSION['sort_order']); // add message rows rcmail_js_message_list($a_headers, false); // remove messages that don't exists from list selection array |
