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 {