From d1e4cd97e66892c9044cab9745d29c3c38e3c65e Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 11 Mar 2011 19:31:06 +0000 Subject: [PATCH] Monotone-Parent: c3ae9437f2d6f5684527ea0486ab6204b9ce62b2 Monotone-Revision: 39ce1fba9746592044921a256d39e922dc2153d8 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-03-11T19:31:06 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ SoObjects/Contacts/SOGoContactFolders.m | 9 +++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d8378e87..370e8d23e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-03-11 Wolfgang Sourdeau + + * SoObjects/Contacts/SOGoContactFolders.m + (-setDavContactsCategories:): we need to handle the case where the + "category" element has more than one subnode, in particular when + xml entities are used. + 2011-03-11 Francis Lachapelle * UI/WebServerResources/ContactsUI.js (initContacts): don't define diff --git a/SoObjects/Contacts/SOGoContactFolders.m b/SoObjects/Contacts/SOGoContactFolders.m index 94e79a972..b208d0805 100644 --- a/SoObjects/Contacts/SOGoContactFolders.m +++ b/SoObjects/Contacts/SOGoContactFolders.m @@ -115,7 +115,7 @@ { SOGoUser *ownerUser; NSMutableArray *categories; - DOMElement *documentElement, *catNode, *textNode; + DOMElement *documentElement, *catNode; id document; id catNodes; NSUInteger count, max; @@ -133,14 +133,11 @@ { catNode = [catNodes objectAtIndex: count]; if ([catNode hasChildNodes]) - { - textNode = [[catNode childNodes] objectAtIndex: 0]; - [categories addObject: [textNode nodeValue]]; - } + [categories addObject: [catNode textValue]]; } } - NSLog (@"setting categories to : %@", categories); + // NSLog (@"setting categories to : %@", categories); ownerUser = [SOGoUser userWithLogin: owner]; ud = [ownerUser userDefaults]; [ud setContactsCategories: categories];