From ba3718709c5f49a88c784ea71b581b460e153f40 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 22 Sep 2008 20:33:30 +0000 Subject: [PATCH] Monotone-Parent: 9adad96605712f34ea4b5d3a10c392e250208cab Monotone-Revision: f91865d8f9470a31d323ceafab1bbc5f1f2b42ec Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-09-22T20:33:30 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ .../Appointments/SOGoAppointmentFolder.m | 19 ++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3cff3127e..b3775fc66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-09-22 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentFolder.m + ([SOGoAppointmentFolder -davCollectionTag]): do not ignore deleted + records when "computing" the ctag. Also, the EOSpecification + instance should not be static, otherwise any subsequent queries + will be based on the ctag of the first calendar ever queried. + * SoObjects/SOGo/NSString+Utilities.m ([NSString -asQPSubjectString:encoding]): replace spaces with underscore characters to comply with rfc 2047. diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index fd53b61ca..05df997bb 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -2036,19 +2036,16 @@ static Class sogoAppointmentFolderKlass = Nil; NSString *cTag; folder = [self ocsFolder]; - if (!cTagSpec) - { - ordering = [EOSortOrdering sortOrderingWithKey: @"c_lastmodified" - selector: EOCompareDescending]; - cTagSpec = [EOFetchSpecification - fetchSpecificationWithEntityName: [folder folderName] - qualifier: nil - sortOrderings: [NSArray arrayWithObject: ordering]]; - [cTagSpec retain]; - } + 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]; + fetchSpecification: cTagSpec + ignoreDeleted: NO]; if ([records count]) { lastModified = [[records objectAtIndex: 0] objectForKey: @"c_lastmodified"];