From b13636f3857cd859abe6741a62f70f7f5696fb49 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 25 Apr 2007 15:14:40 +0000 Subject: [PATCH] Monotone-Parent: 0737b1db6b347f529b14555dcbe67d99f357aaf6 Monotone-Revision: be54fe500757d5b3077ad04c8c9a43cf4088ec61 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-04-25T15:14:40 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ SoObjects/Appointments/SOGoAppointmentFolder.m | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92a2f538b..1e50d1c34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-04-25 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentFolder.m + ([SOGoAppointmentFolder -davResourceType]): fixed a problem with + our double declaration where the resulting XML would be screwed. + There is only one collection per namespace. + * SoObjects/SOGo/NSCalendarDate+SOGo.m ([NSCalendarDate rfc822DateString]): new method that returns a string conform to rfc 822 and suitable for email headers. diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 1dd53077a..bfc9fb137 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -421,17 +421,18 @@ static NSNumber *sharedYes = nil; - (NSArray *) davResourceType { static NSArray *colType = nil; - NSArray *cdCol; - NSMutableArray *gdCol; + NSArray *cdCol, *gdRT, *gdVEventCol, *gdVTodoCol; if (!colType) { - gdCol = [NSMutableArray new]; - [gdCol addObjectsFromArray: [self groupDavResourceType]]; - [gdCol addObject: XMLNS_GROUPDAV]; + gdRT = [self groupDavResourceType]; + gdVEventCol = [NSArray arrayWithObjects: [gdRT objectAtIndex: 0], + XMLNS_GROUPDAV, nil]; + gdVTodoCol = [NSArray arrayWithObjects: [gdRT objectAtIndex: 1], + XMLNS_GROUPDAV, nil]; cdCol = [NSArray arrayWithObjects: @"calendar", XMLNS_CALDAV, nil]; - colType = [NSArray arrayWithObjects: @"collection", cdCol, gdCol, nil]; - [gdCol release]; + colType = [NSArray arrayWithObjects: @"collection", cdCol, + gdVEventCol, gdVTodoCol, nil]; [colType retain]; }