From 39c9be64dbad1162df3e97d8878be138b963ea87 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 23 Jun 2009 23:38:52 +0000 Subject: [PATCH] Monotone-Parent: 5f0e6bd5b6298ffdd908398135216841ba3b6909 Monotone-Revision: 22b4654cd70bbe3488846e0939147e93e6113c95 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-06-23T23:38:52 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 ++++++ .../Appointments/SOGoAppointmentFolder.m | 23 +++---------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index e695c03f6..dc64306b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-06-23 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoAppointmentFolder.m + (-davCalendarQuery:,-davCalendarMultiget:): automatically include + "c_component" in the requested fields, so that items can be + instantiated properly. + 2009-06-23 Cyril Robert * SoObjects/Mailer/NSString+Mail.m (stringByConvertingCRLNToHTML): Added diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index b9a85182f..1f088b3ae 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -79,8 +79,6 @@ static NGLogger *logger = nil; static NSNumber *sharedYes = nil; -static NSArray *reportQueryFields = nil; -static NSArray *reducedReportQueryFields = nil; + (void) initialize { @@ -93,21 +91,6 @@ static NSArray *reducedReportQueryFields = nil; [iCalEntityObject initializeSOGoExtensions]; - if (!reportQueryFields) - reportQueryFields = [[NSArray alloc] initWithObjects: @"c_name", - @"c_content", @"c_creationdate", - @"c_lastmodified", @"c_version", - @"c_component", - @"c_classification", - nil]; - if (!reducedReportQueryFields) - reducedReportQueryFields = [[NSArray alloc] initWithObjects: - @"c_name", - @"c_creationdate", - @"c_lastmodified", - @"c_version", - @"c_classification", - @"c_component", nil]; NSAssert2([super version] == 0, @"invalid superclass (%@) version %i !", NSStringFromClass([self superclass]), [super version]); @@ -1601,7 +1584,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir NSString **propertiesArray; unsigned int count, max, propertiesCount; - fields = [NSMutableArray arrayWithObject: @"c_name"]; + fields = [NSMutableArray arrayWithObjects: @"c_name", @"c_component", nil]; [fields addObjectsFromArray: [properties allValues]]; baseURL = [[self davURL] absoluteString]; @@ -1835,7 +1818,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir propertiesArray = [[properties allKeys] asPointersOfObjects]; propertiesCount = [properties count]; - fields = [NSMutableArray arrayWithObject: @"c_name"]; + fields = [NSMutableArray arrayWithObjects: @"c_name", @"c_component", nil]; [fields addObjectsFromArray: [properties allValues]]; components = [self _fetchComponentsMatchingURLs: urls fields: fields]; @@ -2295,7 +2278,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir count = [records count]; if (count) { - filename = [[records objectAtIndex:0] valueForKey:@"c_name"]; + filename = [[records objectAtIndex:0] valueForKey: @"c_name"]; if (count > 1) [self errorWithFormat: @"The storage contains more than file with UID '%@'",