From 4a98e5b521dcd64fef7d08521d10d5dd32e3817d Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 9 Dec 2013 10:31:34 -0500 Subject: [PATCH] Don't append unknown objects to the REPORT result. --- SoObjects/Contacts/SOGoContactSourceFolder.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index faa4f5ed5..2e78af33d 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -534,14 +534,12 @@ [r appendString: [[object objectForKey: @"c_name"] stringByEscapingURL]]; [r appendString: @""]; -// NSLog (@"(appendPropstats...): %@", [NSDate date]); propstats = [self _propstats: properties count: propertiesCount ofObject: object]; max = [propstats count]; for (count = 0; count < max; count++) [self _appendPropstat: [propstats objectAtIndex: count] - toBuffer: r]; -// NSLog (@"/(appendPropstats...): %@", [NSDate date]); + toBuffer: r]; [r appendString: @""]; } @@ -562,8 +560,10 @@ NSString *url, *baseURL, *cname; NSString **propertiesArray; NSMutableString *buffer; - unsigned int count, max, propertiesCount; + NSDictionary *object; + unsigned int count, max, propertiesCount; + baseURL = [self davURLAsString]; #warning review this when fixing http://www.scalableogo.org/bugs/view.php?id=276 if (![baseURL hasSuffix: @"/"]) @@ -580,8 +580,9 @@ element = [refs objectAtIndex: count]; url = [[[element firstChild] nodeValue] stringByUnescapingURL]; cname = [self _deduceObjectNameFromURL: url fromBaseURL: baseURL]; - if (cname) - [self appendObject: [source lookupContactEntry: cname] + object = [source lookupContactEntry: cname]; + if (object) + [self appendObject: object properties: propertiesArray count: propertiesCount withBaseURL: baseURL