summaryrefslogtreecommitdiff
path: root/program/steps/mail/search.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/search.inc
parent7e263ea2048721482c00db65d4511f00c4c7b1d4 (diff)
- Remove deprecated global $IMAP variable usage (#1488148)
Diffstat (limited to 'program/steps/mail/search.inc')
-rw-r--r--program/steps/mail/search.inc18
1 files changed, 9 insertions, 9 deletions
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index 05ba9d23e..42bdf9776 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -18,8 +18,8 @@
$REMOTE_REQUEST = TRUE;
// reset list_page and old search results
-$IMAP->set_page(1);
-$IMAP->set_search_set(NULL);
+$RCMAIL->imap->set_page(1);
+$RCMAIL->imap->set_search_set(NULL);
$_SESSION['page'] = 1;
// using encodeURI with javascript "should" give us
@@ -107,32 +107,32 @@ $search_str = trim($search_str);
// execute IMAP search
if ($search_str)
- $IMAP->search($mbox, $search_str, $imap_charset, $_SESSION['sort_col']);
+ $RCMAIL->imap->search($mbox, $search_str, $imap_charset, $_SESSION['sort_col']);
// save search results in session
if (!is_array($_SESSION['search']))
$_SESSION['search'] = array();
if ($search_str) {
- $_SESSION['search'] = $IMAP->get_search_set();
+ $_SESSION['search'] = $RCMAIL->imap->get_search_set();
$_SESSION['last_text_search'] = $str;
}
$_SESSION['search_request'] = $search_request;
// Get the headers
-$result_h = $IMAP->list_headers($mbox, 1, $_SESSION['sort_col'], $_SESSION['sort_order']);
-$count = $IMAP->messagecount($mbox, $IMAP->threading ? 'THREADS' : 'ALL');
+$result_h = $RCMAIL->imap->list_headers($mbox, 1, $_SESSION['sort_col'], $_SESSION['sort_order']);
+$count = $RCMAIL->imap->messagecount($mbox, $RCMAIL->imap->threading ? 'THREADS' : 'ALL');
// Make sure we got the headers
if (!empty($result_h)) {
rcmail_js_message_list($result_h);
if ($search_str)
- $OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $IMAP->messagecount(NULL, 'ALL')));
+ $OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $RCMAIL->imap->messagecount(NULL, 'ALL')));
}
// handle IMAP errors (e.g. #1486905)
-else if ($err_code = $IMAP->get_error_code()) {
+else if ($err_code = $RCMAIL->imap->get_error_code()) {
rcmail_display_server_error();
}
else {
@@ -142,7 +142,7 @@ else {
// update message count display
$OUTPUT->set_env('search_request', $search_str ? $search_request : '');
$OUTPUT->set_env('messagecount', $count);
-$OUTPUT->set_env('pagecount', ceil($count/$IMAP->page_size));
+$OUTPUT->set_env('pagecount', ceil($count/$RCMAIL->imap->page_size));
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count, 1), $mbox);
$OUTPUT->send();