summaryrefslogtreecommitdiff
path: root/program/steps/mail/list.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-12-07 10:41:15 +0000
committeralecpl <alec@alec.pl>2011-12-07 10:41:15 +0000
commitb6da0b76afb5697685c35b8584631294cfc7b12f (patch)
treeda81d13466eccdfe287075e5a77ee37ab485a1bc /program/steps/mail/list.inc
parent7e263ea2048721482c00db65d4511f00c4c7b1d4 (diff)
- Remove deprecated global $IMAP variable usage (#1488148)
Diffstat (limited to 'program/steps/mail/list.inc')
-rw-r--r--program/steps/mail/list.inc22
1 files changed, 11 insertions, 11 deletions
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index 9988a00b4..c2a47488f 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -51,30 +51,30 @@ if ($cols = get_input_value('_cols', RCUBE_INPUT_GET))
if ($save_arr)
$RCMAIL->user->save_prefs($save_arr);
-$mbox_name = $IMAP->get_mailbox_name();
+$mbox_name = $RCMAIL->imap->get_mailbox_name();
// Synchronize mailbox cache, handle flag changes
-$IMAP->mailbox_sync($mbox_name);
+$RCMAIL->imap->mailbox_sync($mbox_name);
// initialize searching result if search_filter is used
if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL')
{
$search_request = md5($mbox_name.$_SESSION['search_filter']);
- $IMAP->search($mbox_name, $_SESSION['search_filter'], RCMAIL_CHARSET, $sort_col);
- $_SESSION['search'] = $IMAP->get_search_set();
+ $RCMAIL->imap->search($mbox_name, $_SESSION['search_filter'], RCMAIL_CHARSET, $sort_col);
+ $_SESSION['search'] = $RCMAIL->imap->get_search_set();
$_SESSION['search_request'] = $search_request;
$OUTPUT->set_env('search_request', $search_request);
}
// fetch message headers
-if ($count = $IMAP->messagecount($mbox_name, $IMAP->threading ? 'THREADS' : 'ALL', !empty($_REQUEST['_refresh'])))
- $a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order);
+if ($count = $RCMAIL->imap->messagecount($mbox_name, $RCMAIL->imap->threading ? 'THREADS' : 'ALL', !empty($_REQUEST['_refresh'])))
+ $a_headers = $RCMAIL->imap->list_headers($mbox_name, NULL, $sort_col, $sort_order);
// update search set (possible change of threading mode)
if (!empty($_REQUEST['_search']) && isset($_SESSION['search'])
&& $_SESSION['search_request'] == $_REQUEST['_search']
) {
- $_SESSION['search'] = $IMAP->get_search_set();
+ $_SESSION['search'] = $RCMAIL->imap->get_search_set();
}
// remove old search data
else if (empty($_REQUEST['_search']) && isset($_SESSION['search'])) {
@@ -91,11 +91,11 @@ if (empty($search_request) && empty($a_headers)) {
rcmail_send_unread_count($mbox_name, !empty($_REQUEST['_refresh']), $unseen);
// update message count display
-$pages = ceil($count/$IMAP->page_size);
+$pages = ceil($count/$RCMAIL->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', $count ? $IMAP->list_page : 1);
+$OUTPUT->set_env('threading', (bool) $RCMAIL->imap->threading);
+$OUTPUT->set_env('current_page', $count ? $RCMAIL->imap->list_page : 1);
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count), $mbox_name);
$OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text());
@@ -108,7 +108,7 @@ if (isset($a_headers) && count($a_headers))
}
else {
// handle IMAP errors (e.g. #1486905)
- if ($err_code = $IMAP->get_error_code()) {
+ if ($err_code = $RCMAIL->imap->get_error_code()) {
rcmail_display_server_error();
}
else if ($search_request)