From ac0fc383fd43e8955b0ab22f70463159b14c74b0 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 23 Dec 2013 05:33:41 -0500
Subject: [PATCH] Fix so message flags modified by another client are applied on the list on refresh (#1485186)

---
 program/steps/mail/search.inc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index 03d6de3..210bedb 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -131,6 +131,13 @@
   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()) {

--
Gitblit v1.9.1