From 2a0f7e7fb40f4824e61f0dbc956d52f9a10856c4 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 14 Sep 2007 23:16:16 +0000 Subject: [PATCH] Monotone-Parent: ed4ace3848e6db50985728fd7e65ef650f45e202 Monotone-Revision: 53251d894e24b81b16181d88c88f3aed369a5d19 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-14T23:16:16 Monotone-Branch: ca.inverse.sogo --- UI/Common/UIxFolderActions.m | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/UI/Common/UIxFolderActions.m b/UI/Common/UIxFolderActions.m index 6fdd4c319..8aec0229e 100644 --- a/UI/Common/UIxFolderActions.m +++ b/UI/Common/UIxFolderActions.m @@ -219,4 +219,27 @@ return response; } +- (id) batchDeleteAction +{ + WOResponse *response; + NSString *idsParam; + NSArray *ids; + + idsParam = [[context request] formValueForKey: @"ids"]; + ids = [idsParam componentsSeparatedByString: @"/"]; + if ([ids count]) + { + clientObject = [self clientObject]; + [clientObject deleteEntriesWithIds: ids]; + response = [self responseWith204]; + } + else + { + response = [self responseWithStatus: 500]; + [response appendContentString: @"At least 1 id required."]; + } + + return response; +} + @end