From 7a7c75e240422664021a752bb2e510cd9ef0efe3 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 24 Jan 2008 15:36:26 +0000 Subject: [PATCH] Monotone-Parent: e83f50e38737703b47fbfe973f685c195a25232d Monotone-Revision: ff201d8484b08d9e29b03401dc626b86400b923a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-01-24T15:36:26 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ .../Appointments/SOGoAppointmentFolder.m | 19 ++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 773ef7478..2c004999f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-01-24 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentFolder.m: if c_cycleinfo + is an NSNull instance, we consider it to be empty and return + automatically with an error message in the log. + * OGoContentStore/OCSiCalFieldExtractor.m ([OCSiCalFieldExtractor -extractQuickFieldsFromTodo:_task]): handle recurrence info in tasks. diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 190982a9d..aec706eef 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -634,12 +634,21 @@ static NSNumber *sharedYes = nil; NGCalendarDateRange *fir; NSArray *rules, *exRules, *exDates, *ranges; unsigned i, count; + NSString *content; - cycleinfo = [[_row objectForKey:@"c_cycleinfo"] propertyList]; - if (cycleinfo == nil) { - [self errorWithFormat:@"cyclic record doesn't have cycleinfo -> %@", _row]; - return; - } + content = [_row objectForKey: @"c_cycleinfo"]; + if (![content isNotNull]) + { + [self errorWithFormat:@"cyclic record doesn't have cycleinfo -> %@", _row]; + return; + } + + cycleinfo = [content propertyList]; + if (!cycleinfo) + { + [self errorWithFormat:@"cyclic record doesn't have cycleinfo -> %@", _row]; + return; + } row = [self fixupRecord:_row fetchRange: _r]; [row removeObjectForKey: @"c_cycleinfo"];