Skip to content

Commit

Permalink
LDIF to vCard: inverse values of "ou" and "o"
Browse files Browse the repository at this point in the history
Fixes #4278
  • Loading branch information
cgx committed Sep 7, 2017
1 parent e0b0c9c commit 3189e0e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions SoObjects/Contacts/NGVCard+SOGo.m
Expand Up @@ -325,18 +325,18 @@ - (void) updateFromLDIFRecord: (NSDictionary *) ldifRecord
[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];
Expand Down

0 comments on commit 3189e0e

Please sign in to comment.