From bd51263b3eff7d17e4197e9a9a02c91740d463ec Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 22 Aug 2008 19:57:18 +0000 Subject: [PATCH] Monotone-Parent: 45c31921bfd88fe407ba78dde7266a4ef4b75ef6 Monotone-Revision: a0baf3974def7568b78583eee52ce7c060344b6b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-08-22T19:57:18 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/Contacts/SOGoContactLDIFEntry.m | 19 ++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c77ec13d5..12c37be40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-08-22 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactLDIFEntry.m ([SOGoContactLDIFEntry + -vCard]): replaced query for field "notes" with "description". + Added support for Mozilla custom fields 1 to 4. + * SoObjects/Mailer/SOGoHTMLMailBodyPart.[hm]: new class module implementing the HTML content body parts. diff --git a/SoObjects/Contacts/SOGoContactLDIFEntry.m b/SoObjects/Contacts/SOGoContactLDIFEntry.m index 3b7104c07..d444306ee 100644 --- a/SoObjects/Contacts/SOGoContactLDIFEntry.m +++ b/SoObjects/Contacts/SOGoContactLDIFEntry.m @@ -115,12 +115,13 @@ { NSString *info, *surname, *streetAddress, *location; CardElement *element; + unsigned int count; if (!vcard) { vcard = [[NGVCard alloc] initWithUid: [self nameInContainer]]; [vcard setVClass: @"PUBLIC"]; - [vcard setProdID: @"-//OpenGroupware.org//SOGo"]; + [vcard setProdID: @"-//Inverse inc.//SOGo"]; [vcard setProfile: @"vCard"]; info = [ldifEntry objectForKey: @"displayName"]; if (!(info && [info length] > 0)) @@ -140,10 +141,7 @@ info = [ldifEntry objectForKey: @"mozillaNickname"]; if (info) [vcard setNickname: info]; - info = [ldifEntry objectForKey: @"xmozillaNickname"]; - if (info) - [vcard setNickname: info]; - info = [ldifEntry objectForKey: @"notes"]; + info = [ldifEntry objectForKey: @"description"]; if (info) [vcard setNote: info]; info = [ldifEntry objectForKey: @"mail"]; @@ -167,6 +165,17 @@ [vcard addChildWithTag: @"FBURL" types: nil singleValue: info]; + for (count = 1; count < 5; count++) + { + info = [ldifEntry objectForKey: + [NSString stringWithFormat: @"mozillaCustom%d", + count]]; + if (info) + [vcard addChildWithTag: [NSString stringWithFormat: @"CUSTOM%d", + count] + types: nil + singleValue: info]; + } } return vcard;