From b6076c9e8e88492145cf198a1a851bf25c5b81a0 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 8 Jan 2016 13:41:04 -0500 Subject: [PATCH] Fix deletion of an appointment with attendees --- UI/Common/UIxObjectActions.m | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/UI/Common/UIxObjectActions.m b/UI/Common/UIxObjectActions.m index c8d39e729..632327620 100644 --- a/UI/Common/UIxObjectActions.m +++ b/UI/Common/UIxObjectActions.m @@ -1,8 +1,8 @@ /* UIxObjectActions.m - this file is part of SOGo * - * Copyright (C) 2007-2010 Inverse inc. + * Copyright (C) 2007-2016 Inverse inc. * - * Author: Wolfgang Sourdeau + * Author: Inverse * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +28,7 @@ #import #import +#import #import #import @@ -99,13 +100,18 @@ { WOResponse *response; NSDictionary *data; + SOGoContentObject *deleteObject; + + deleteObject = [self clientObject]; + if ([deleteObject respondsToSelector: @selector (prepareDelete)]) + [deleteObject prepareDelete]; + response = (WOResponse *) [deleteObject delete]; - response = (WOResponse *) [[self clientObject] delete]; if (response) { data = [NSDictionary dictionaryWithObjectsAndKeys: [(NSException *) response reason], @"error", nil]; response = [self responseWithStatus: 403 - andString: [data jsonRepresentation]]; + andJSONRepresentation: data]; } else {