From d384c3be9933f93b35c6c030a3b271d229d90e83 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 30 Mar 2011 02:14:56 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: c9d83319c3cc894c26d31f564f3d4722c49c590e Monotone-Revision: 9b486432ba55fa5e9a8bf8f7172fe57752abf7e1 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-03-30T02:14:56 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/Appointments/SOGoAppointmentFolder.m | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index db026f369..ad92765f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-03-30 Francis Lachapelle + + * SoObjects/Appointments/SOGoAppointmentFolder.m + (-fetchFreeBusyInfosFrom:to:): we must fetch the c_content in + order to flatten cyclic events. + 2011-03-29 Francis Lachapelle * SoObjects/Appointments/iCalEvent+SOGo.m diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 0baf774fc..a599b7a2a 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -882,7 +882,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir [row setObject: sharedYes forKey: @"isRecurrentEvent"]; content = [theRecord objectForKey: @"c_content"]; - if ([content length]) + if ([content isNotNull]) { elements = [iCalCalendar parseFromSource: content]; if ([elements count]) @@ -941,7 +941,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir } } } - + else + [self errorWithFormat:@"cyclic record doesn't have content -> %@", theRecord]; + max = [ranges count]; for (count = 0; count < max; count++) { @@ -1125,6 +1127,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir qualifier = [EOQualifier qualifierWithQualifierFormat: [where substringFromIndex: 4]]; records = [folder fetchFields: fields matchingQualifier: qualifier]; + if (records) { if (r) @@ -1144,7 +1147,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir { if (r) records = [self _flattenCycleRecords: records fetchRange: r]; - if (ma) + if (ma) [ma addObjectsFromArray: records]; else ma = [NSMutableArray arrayWithArray: records]; @@ -2226,7 +2229,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir static NSArray *infos = nil; // TODO: move to a plist file if (!infos) - infos = [[NSArray alloc] initWithObjects: @"c_partmails", @"c_partstates", + infos = [[NSArray alloc] initWithObjects: @"c_content", @"c_partmails", @"c_partstates", @"c_isopaque", @"c_status", @"c_cycleinfo", @"c_orgmail", nil]; // We MUST include the protected information when checking for freebusy info as