diff --git a/ChangeLog b/ChangeLog index 1a811ba2f..da37d5364 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-08-20 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder + -_flattenedRecords:records]): when the c_cn field is empty, + returns set a formatted string with the concatenation of + c_givenname and c_sn as the displayName. + * SoObjects/Mailer/SOGoMailAccounts.m ([SOGoMailAccounts -isValidMailAccountName:_key]): prevent unknown accounts from being accessed. diff --git a/SoObjects/Contacts/SOGoContactGCSFolder.m b/SoObjects/Contacts/SOGoContactGCSFolder.m index 7228ac628..47eb5f13c 100644 --- a/SoObjects/Contacts/SOGoContactGCSFolder.m +++ b/SoObjects/Contacts/SOGoContactGCSFolder.m @@ -30,11 +30,12 @@ #import #import +#import #import "SOGoContactGCSEntry.h" #import "SOGoContactGCSFolder.h" #define folderListingFields [NSArray arrayWithObjects: @"c_name", @"c_cn", \ - @"c_givenname", @"c_screenname", \ + @"c_givenname", @"c_sn", @"c_screenname", \ @"c_o", @"c_mail", @"c_telephonenumber", \ nil] @@ -177,8 +178,8 @@ forKey: @"c_name"]; data = [oldRecord objectForKey: @"c_cn"]; - if (!data) - data = @""; + if (![data length]) + data = [oldRecord keysWithFormat: @"%{c_givenname} %{c_sn}"]; [newRecord setObject: data forKey: @"displayName"];