summaryrefslogtreecommitdiff
path: root/program/steps/mail/check_recent.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-12-23 11:33:41 +0100
committerAleksander Machniak <alec@alec.pl>2013-12-23 11:33:41 +0100
commitac0fc383fd43e8955b0ab22f70463159b14c74b0 (patch)
tree3b0c5aafc0e8b6cb5b58d671f5f048ecb100f9ce /program/steps/mail/check_recent.inc
parent6b2b2eca5fa48720c4e5b31b9aae200a185dfc0e (diff)
Fix so message flags modified by another client are applied on the list on refresh (#1485186)
Diffstat (limited to 'program/steps/mail/check_recent.inc')
-rw-r--r--program/steps/mail/check_recent.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index 3aa7b3e9c..60da68a96 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -114,6 +114,24 @@ foreach ($a_mailboxes as $mbox_name) {
$OUTPUT->command('update_selection');
}
}
+ // handle flag updates
+ else if ($is_current && ($uids = rcube_utils::get_input_value('_uids', rcube_utils::INPUT_GPC))) {
+ $data = $RCMAIL->storage->folder_data($mbox_name);
+
+ if (empty($_SESSION['list_mod_seq']) || $_SESSION['list_mod_seq'] != $data['HIGHESTMODSEQ']) {
+ $flags = $RCMAIL->storage->list_flags($mbox_name, explode(',', $uids), $_SESSION['list_mod_seq']);
+ foreach ($flags as $idx => $row) {
+ $flags[$idx] = array_change_key_case(array_map('intval', $row));
+ }
+
+ // remember last HIGHESTMODSEQ value (if supported)
+ if (!empty($data['HIGHESTMODSEQ'])) {
+ $_SESSION['list_mod_seq'] = $data['HIGHESTMODSEQ'];
+ }
+
+ $RCMAIL->output->set_env('recent_flags', $flags);
+ }
+ }
}
// trigger refresh hook