3 +-----------------------------------------------------------------------+
4 | program/steps/mail/mark.inc |
6 | This file is part of the RoundCube Webmail client |
7 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland |
8 | Licensed under the GNU GPL |
11 | Mark the submitted messages with the specified flag |
13 +-----------------------------------------------------------------------+
14 | Author: Thomas Bruederli <roundcube@gmail.com> |
15 +-----------------------------------------------------------------------+
17 $Id: mark.inc 1962 2008-10-09 06:25:43Z alec $
22 'undelete' => 'UNDELETED',
23 'delete' => 'DELETED',
26 'flagged' => 'FLAGGED',
27 'unflagged' => 'UNFLAGGED');
29 if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_value('_flag', RCUBE_INPUT_POST)))
31 $flag = $a_flags_map[$flag] ? $a_flags_map[$flag] : strtoupper($flag);
32 $marked = $IMAP->set_flag($uids, $flag);
34 if($flag == 'DELETED' && $CONFIG['read_when_deleted'] && !empty($_POST['_ruid']))
36 $uids = get_input_value('_ruid', RCUBE_INPUT_POST);
37 $read = $IMAP->set_flag($uids, 'SEEN');
40 $OUTPUT->command('flag_deleted_as_read', $uids);
43 if ($marked != -1 && ($flag == 'SEEN' || $flag == 'UNSEEN'))
45 $mbox_name = $IMAP->get_mailbox_name();
46 $OUTPUT->command('set_unread_count', $mbox_name, $IMAP->messagecount($mbox_name, 'UNSEEN'), ($mbox_name == 'INBOX'));