From 3189e0e13a3d43596dc115e3690630a9266488c8 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 7 Sep 2017 13:41:51 -0400 Subject: [PATCH] LDIF to vCard: inverse values of "ou" and "o" Fixes #4278 --- SoObjects/Contacts/NGVCard+SOGo.m | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/SoObjects/Contacts/NGVCard+SOGo.m b/SoObjects/Contacts/NGVCard+SOGo.m index 0cc8963d4..ee82415f9 100644 --- a/SoObjects/Contacts/NGVCard+SOGo.m +++ b/SoObjects/Contacts/NGVCard+SOGo.m @@ -325,18 +325,18 @@ convention: [element setValues: [ldifRecord objectForKey: @"c"] atIndex: 6 forKey: @""]; - ou = [ldifRecord objectForKey: @"ou"]; - if ([ou isKindOfClass: [NSArray class]]) - units = [NSMutableArray arrayWithArray: (NSArray *)ou]; - else if (ou) - units = [NSMutableArray arrayWithObject: ou]; - else - units = [NSMutableArray array]; o = [ldifRecord objectForKey: @"o"]; if ([o isKindOfClass: [NSArray class]]) - [units addObjectsFromArray: (NSArray *)o]; + units = [NSMutableArray arrayWithArray: (NSArray *)o]; else if (o) - [units addObject: o]; + units = [NSMutableArray arrayWithObject: o]; + else + units = [NSMutableArray array]; + ou = [ldifRecord objectForKey: @"ou"]; + if ([ou isKindOfClass: [NSArray class]]) + [units addObjectsFromArray: (NSArray *)ou]; + else if (ou) + [units addObject: ou]; [self setOrganizations: units]; [self _setPhoneValues: ldifRecord];