From 4cd8976dc7d8dc4d9372f9cd79650d912857e0c2 Mon Sep 17 00:00:00 2001 From: svncommit Date: Mon, 1 May 2006 16:23:03 +0000 Subject: Added support for undelete --- program/steps/mail/mark.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'program/steps/mail') diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc index be9814ecb..c12429d4a 100644 --- a/program/steps/mail/mark.inc +++ b/program/steps/mail/mark.inc @@ -21,15 +21,16 @@ $REMOTE_REQUEST = TRUE; -$a_flags_map = array('read' => 'SEEN', +$a_flags_map = array('undelete' => 'UNDELETED', + 'delete' => 'DELETED', + 'read' => 'SEEN', 'unread' => 'UNSEEN'); if ($_GET['_uid'] && $_GET['_flag']) { $flag = $a_flags_map[$_GET['_flag']] ? $a_flags_map[$_GET['_flag']] : strtoupper($_GET['_flag']); $marked = $IMAP->set_flag($_GET['_uid'], $flag); - - if ($marked) + if ($marked != -1) { $mbox = $IMAP->get_mailbox_name(); $commands = sprintf("this.set_unread_count('%s', %d);\n", $mbox, $IMAP->messagecount($mbox, 'UNSEEN')); -- cgit v1.2.3