summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-04-12 17:37:22 +0000
committeralecpl <alec@alec.pl>2008-04-12 17:37:22 +0000
commit3d35312cc4badb64a2c26db8e80c1a01f2d1c12b (patch)
tree4ef398738cbdd9682f2fcbc823242536c7027501 /program/steps/mail
parent47124c2279382714afd8dbe4a867a867ea179199 (diff)
- Fixed and optimized 'read_when_deleted': mark as read on server side
in one action when marking as deleted, fixed js bugs when deleting from message preview page
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/mark.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc
index 53194b5ab..830f1fe3d 100644
--- a/program/steps/mail/mark.inc
+++ b/program/steps/mail/mark.inc
@@ -29,6 +29,15 @@ if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_va
$flag = $a_flags_map[$flag] ? $a_flags_map[$flag] : strtoupper($flag);
$marked = $IMAP->set_flag($uids, $flag);
+ if($flag == 'DELETED' && $CONFIG['read_when_deleted'] && !empty($_POST['_ruid']))
+ {
+ $uids = get_input_value('_ruid', RCUBE_INPUT_POST);
+ $read = $IMAP->set_flag($uids, 'SEEN');
+
+ if ($read != -1)
+ $OUTPUT->command('flag_deleted_as_read', $uids);
+ }
+
if ($marked != -1)
{
$mbox_name = $IMAP->get_mailbox_name();