From e1ad72a534883385c515b9de54f4c30fbac25ba4 Mon Sep 17 00:00:00 2001 From: C Robert Date: Fri, 17 Jul 2009 18:36:09 +0000 Subject: [PATCH] Fixed iCal freebusy Monotone-Parent: e48539d48e55adfdd1d2fd81c389b3490d23aeaa Monotone-Revision: 084a7a5ec0ad85b0c967e9425da2b4b789029549 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-07-17T18:36:09 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ SOPE/NGCards/ChangeLog | 4 ++++ SOPE/NGCards/iCalPerson.m | 2 +- SoObjects/Appointments/SOGoAppointmentFolder.m | 12 ++++-------- SoObjects/Appointments/SOGoFreeBusyObject.m | 1 - 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 46cf4c2dc..8843a2346 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-17 Cyril Robert + + * SoObjects/Appointments/SOGoAppointmentFolder.m + (freebusyResponseForRecipient): Removed CDATA tag + * SoObjects/Appointments/SOGoFreeBusyObject.m (iCalPersonWithUID): Removed + setCn, since iCal fails when present. + 2009-07-16 Francis Lachapelle * SoObjects/SOGo/SOGoObject.m ([SOGoObject -setOwner:]): update diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index d6236c188..c54f4a541 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,3 +1,7 @@ +2009-07-17 Cyril Robert + + * iCalPerson.m: Lowercased MAILTO to make it work with iCal. + 2009-04-21 Francis Lachapelle * iCalTrigger.m ([iCalTrigger -setRelationType:]): new method to diff --git a/SOPE/NGCards/iCalPerson.m b/SOPE/NGCards/iCalPerson.m index 11b76507a..77df8b154 100644 --- a/SOPE/NGCards/iCalPerson.m +++ b/SOPE/NGCards/iCalPerson.m @@ -56,7 +56,7 @@ - (void) setEmail: (NSString *)_s { [self setValue: 0 - to: [NSString stringWithFormat: @"MAILTO:%@", _s]]; + to: [NSString stringWithFormat: @"mailto:%@", _s]]; } - (NSString *) email diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index b506f19c6..78244dd67 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1996,7 +1996,6 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir { NSDictionary *response; NSMutableArray *content; - SOGoWebDAVValue *cdata; NSString *escapedData; content = [NSMutableArray array]; @@ -2006,12 +2005,10 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir { [content addObject: davElementWithContent (@"request-status", XMLNS_CALDAV, @"2.0;Success")]; - escapedData = [NSString stringWithFormat: @"", + escapedData = [NSString stringWithFormat: @"%@", [calendarData stringByEscapingXMLString]]; - cdata = [SOGoWebDAVValue valueForObject: escapedData - attributes: nil]; [content addObject: davElementWithContent (@"calendar-data", XMLNS_CALDAV, - cdata)]; + escapedData)]; } else [content addObject: @@ -2129,10 +2126,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir if (tags) { [response setStatus: 200]; - [response appendContentString:@""]; + [response appendContentString:@""]; [response setHeader: @"application/xml; charset=utf-8" - forKey: @"Content-Type"]; + forKey: @"Content-Type"]; [response appendContentString: [tags asWebDavStringWithNamespaces: nil]]; } diff --git a/SoObjects/Appointments/SOGoFreeBusyObject.m b/SoObjects/Appointments/SOGoFreeBusyObject.m index 5b790ee10..d2b43b790 100644 --- a/SoObjects/Appointments/SOGoFreeBusyObject.m +++ b/SoObjects/Appointments/SOGoFreeBusyObject.m @@ -82,7 +82,6 @@ static unsigned int freebusyRangeEnd = 0; person = [iCalPerson new]; [person autorelease]; - [person setCn: [contactInfos objectForKey: @"cn"]]; [person setEmail: [contactInfos objectForKey: @"c_email"]]; return person;