3 +-----------------------------------------------------------------------+
4 | program/steps/mail/mark.inc |
6 | This file is part of the RoundCube Webmail client |
7 | Copyright (C) 2005, 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 232 2006-05-18 15:46:50Z cmcnulty $
21 $REMOTE_REQUEST = TRUE;
23 $a_flags_map = array('undelete' => 'UNDELETED',
24 'delete' => 'DELETED',
26 'unread' => 'UNSEEN');
28 if ($_GET['_uid'] && $_GET['_flag'])
30 $flag = $a_flags_map[$_GET['_flag']] ? $a_flags_map[$_GET['_flag']] : strtoupper($_GET['_flag']);
31 $marked = $IMAP->set_flag($_GET['_uid'], $flag);
34 $mbox_name = $IMAP->get_mailbox_name();
35 $commands = sprintf("this.set_unread_count('%s', %d);\n", $mbox_name, $IMAP->messagecount($mbox_name, 'UNSEEN'));
36 rcube_remote_response($commands);