summaryrefslogtreecommitdiff
path: root/program/steps/mail/search.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/search.inc')
-rw-r--r--program/steps/mail/search.inc19
1 files changed, 13 insertions, 6 deletions
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index fb1b48797..210bedbb8 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -24,13 +24,13 @@ $_SESSION['page'] = 1;
// using encodeURI with javascript "should" give us
// a correctly encoded query string
-$imap_charset = RCMAIL_CHARSET;
+$imap_charset = RCUBE_CHARSET;
// get search string
-$str = get_input_value('_q', RCUBE_INPUT_GET, true);
-$mbox = get_input_value('_mbox', RCUBE_INPUT_GET, true);
-$filter = get_input_value('_filter', RCUBE_INPUT_GET);
-$headers = get_input_value('_headers', RCUBE_INPUT_GET);
+$str = rcube_utils::get_input_value('_q', rcube_utils::INPUT_GET, true);
+$mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GET, true);
+$filter = rcube_utils::get_input_value('_filter', rcube_utils::INPUT_GET);
+$headers = rcube_utils::get_input_value('_headers', rcube_utils::INPUT_GET);
$subject = array();
$search_request = md5($mbox.$filter.$str);
@@ -131,10 +131,17 @@ if (!empty($result_h)) {
rcmail_js_message_list($result_h);
if ($search_str)
$OUTPUT->show_message('searchsuccessful', 'confirmation', array('nr' => $RCMAIL->storage->count(NULL, 'ALL')));
+
+ // remember last HIGHESTMODSEQ value (if supported)
+ // we need it for flag updates in check-recent
+ $data = $RCMAIL->storage->folder_data($mbox_name);
+ if (!empty($data['HIGHESTMODSEQ'])) {
+ $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ'];
+ }
}
// handle IMAP errors (e.g. #1486905)
else if ($err_code = $RCMAIL->storage->get_error_code()) {
- rcmail_display_server_error();
+ $RCMAIL->display_server_error();
}
else {
$OUTPUT->show_message('searchnomatch', 'notice');