(fix) small fixes over previous commit

This commit is contained in:
Ludovic Marcotte
2017-04-21 14:12:48 -04:00
parent 513d81eb59
commit 5c573b9a76
2 changed files with 5 additions and 4 deletions

View File

@@ -136,7 +136,7 @@
{
NSMutableArray *oldValues, *subValues;
if ([newValues isKindOfClass: [NSString class]])
if (newValues && [newValues isKindOfClass: [NSString class]])
return [self setSingleValue: (NSString *)newValues
atIndex: idx
forKey: key];

View File

@@ -314,19 +314,20 @@ convention:
o = [ldifRecord objectForKey: @"o"];
if ([o isKindOfClass: [NSArray class]])
[units addObjectsFromArray: (NSArray *)o];
else if (ou)
else if (o)
[units addObject: o];
[self setOrganizations: units];
[self _setPhoneValues: ldifRecord];
[self _setEmails: ldifRecord];
[[self elementWithTag: @"url" ofType: @"home"]
setValues: [ldifRecord objectForKey: @"mozillahomeurl"] forKey: @""];
setValues: [ldifRecord objectForKey: @"mozillahomeurl"] atIndex: 0 forKey: @""];
[[self elementWithTag: @"url" ofType: @"work"]
setValues: [ldifRecord objectForKey: @"mozillaworkurl"] forKey: @""];
setValues: [ldifRecord objectForKey: @"mozillaworkurl"] atIndex: 0 forKey: @""];
[[self uniqueChildWithTag: @"x-aim"]
setValues: [ldifRecord objectForKey: @"nsaimid"]
atIndex: 0
forKey: @""];
now = [NSCalendarDate date];