From d224551cfbf5903505f41bc9e51ad9840119942f Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Thu, 31 Jul 2008 11:23:06 -0400 Subject: [PATCH] Fix read_when_deleted behavior + javascript codestyle --- program/steps/mail/move_del.inc | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc index d8a0171..5fbb41c 100644 --- a/program/steps/mail/move_del.inc +++ b/program/steps/mail/move_del.inc @@ -29,7 +29,12 @@ $target = get_input_value('_target_mbox', RCUBE_INPUT_POST); $moved = $IMAP->move_message($uids, $target, get_input_value('_mbox', RCUBE_INPUT_POST)); - if (!$moved) { + if ($moved) { + // flag old messages as read because rcube_imap will not send expunge command after moving + if ($CONFIG['read_when_deleted']) + $IMAP->set_flag($uids, 'SEEN'); + } + else { // send error message $OUTPUT->command('list_mailbox'); $OUTPUT->show_message('errormoving', 'error'); -- Gitblit v1.9.1