From ba7387c39bf24df77122bc5af79375f6c6157e2b Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 26 Sep 2006 18:39:04 +0000 Subject: [PATCH] Monotone-Parent: 535ca06ba5fc04d3cf56ee0db455b20d6440c6af Monotone-Revision: f76b30d3c9c04252e5fed0d8188d8597e78d089d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-09-26T18:39:04 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/Contacts/SOGoContactLDAPEntry.m | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 940c129d0..c674aa6be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-09-26 Wolfgang Sourdeau + + * SoObjects/Contacts/SOGoContactLDAPEntry.m ([SOGoContactLDAPEntry + -vCard]): set the card's fn to attribute "displayName" if found + before "cn". + 2006-09-20 Wolfgang Sourdeau * SoObjects/Contacts/SOGoContactLDAPEntry.m ([SOGoContactLDAPEntry diff --git a/SoObjects/Contacts/SOGoContactLDAPEntry.m b/SoObjects/Contacts/SOGoContactLDAPEntry.m index 343b1b393..53e1037a1 100644 --- a/SoObjects/Contacts/SOGoContactLDAPEntry.m +++ b/SoObjects/Contacts/SOGoContactLDAPEntry.m @@ -143,7 +143,10 @@ [vcard setVClass: @"PUBLIC"]; [vcard setProdID: @"-//OpenGroupware.org//SOGo"]; [vcard setProfile: @"vCard"]; - [vcard setFn: [ldapEntry singleAttributeWithName: @"cn"]]; + info = [ldapEntry singleAttributeWithName: @"displayName"]; + if (!(info && [info length] > 0)) + info = [ldapEntry singleAttributeWithName: @"cn"]; + [vcard setFn: info]; surname = [ldapEntry singleAttributeWithName: @"sn"]; if (!surname) surname = [ldapEntry singleAttributeWithName: @"surname"];