diff --git a/ChangeLog b/ChangeLog index e0ea75311..b70f00530 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-06-08 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoGCSFolder.m (-davCollectionTag): moved method + from SOGoAppointmentFolder since we will need it for contacts + folders as well. + 2009-06-08 Cyril Robert * SoObjects/Appointments/SOGoAppointmentFolder.m: Added c_cycleenddate in diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 1ffc83ca7..1e54a720d 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -2231,37 +2231,6 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir return colType; } -- (NSString *) davCollectionTag -{ - NSArray *records; - GCSFolder *folder; - static EOFetchSpecification *cTagSpec = nil; - EOSortOrdering *ordering; - NSNumber *lastModified; - NSString *cTag; - - folder = [self ocsFolder]; - ordering = [EOSortOrdering sortOrderingWithKey: @"c_lastmodified" - selector: EOCompareDescending]; - cTagSpec = [EOFetchSpecification - fetchSpecificationWithEntityName: [folder folderName] - qualifier: nil - sortOrderings: [NSArray arrayWithObject: ordering]]; - - records = [folder fetchFields: [NSArray arrayWithObject: @"c_lastmodified"] - fetchSpecification: cTagSpec - ignoreDeleted: NO]; - if ([records count]) - { - lastModified = [[records objectAtIndex: 0] objectForKey: @"c_lastmodified"]; - cTag = [lastModified stringValue]; - } - else - cTag = @"-1"; - - return cTag; -} - - (NSString *) davDescription { return @""; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 7c665f1e4..68a8bab55 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -611,6 +611,38 @@ static NSArray *childRecordFields = nil; } } +- (NSString *) davCollectionTag +{ + NSArray *records; + GCSFolder *folder; + static EOFetchSpecification *cTagSpec = nil; + EOSortOrdering *ordering; + NSNumber *lastModified; + NSString *cTag; + + folder = [self ocsFolder]; + ordering = [EOSortOrdering sortOrderingWithKey: @"c_lastmodified" + selector: EOCompareDescending]; + cTagSpec = [EOFetchSpecification + fetchSpecificationWithEntityName: [folder folderName] + qualifier: nil + sortOrderings: [NSArray arrayWithObject: ordering]]; + + records = [folder fetchFields: [NSArray arrayWithObject: @"c_lastmodified"] + fetchSpecification: cTagSpec + ignoreDeleted: NO]; + if ([records count]) + { + lastModified = [[records objectAtIndex: 0] + objectForKey: @"c_lastmodified"]; + cTag = [lastModified stringValue]; + } + else + cTag = @"-1"; + + return cTag; +} + #warning this code should be cleaned up - (void) _subscribeUser: (SOGoUser *) subscribingUser reallyDo: (BOOL) reallyDo @@ -744,15 +776,15 @@ static NSArray *childRecordFields = nil; - (id ) davSubscribe: (WOContext *) queryContext { return [self subscribe: YES - inTheNamesOf: [self _parseDAVDelegatedUser: queryContext] - fromMailInvitation: NO + inTheNamesOf: [self _parseDAVDelegatedUser: queryContext] + fromMailInvitation: NO inContext: queryContext]; } - (id ) davUnsubscribe: (WOContext *) queryContext { return [self subscribe: NO - inTheNamesOf: [self _parseDAVDelegatedUser: queryContext] + inTheNamesOf: [self _parseDAVDelegatedUser: queryContext] fromMailInvitation: NO inContext: queryContext]; }