mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-21 22:32:45 +00:00
Monotone-Parent: 17c806f9d1783a8e0f2f05f26979ca1f64b2693d
Monotone-Revision: ec6aa2b7257921823b50f7441ab2eb83f83f6927 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-10T22:15:03 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -420,34 +420,37 @@ static NSString *defaultMailDomain = nil;
|
||||
while (userEntry)
|
||||
{
|
||||
uid = [userEntry objectForKey: @"c_uid"];
|
||||
returnContact = [compactContacts objectForKey: uid];
|
||||
if (!returnContact)
|
||||
if ([uid length])
|
||||
{
|
||||
returnContact = [NSMutableDictionary dictionary];
|
||||
[returnContact setObject: uid forKey: @"c_uid"];
|
||||
[compactContacts setObject: returnContact forKey: uid];
|
||||
returnContact = [compactContacts objectForKey: uid];
|
||||
if (!returnContact)
|
||||
{
|
||||
returnContact = [NSMutableDictionary dictionary];
|
||||
[returnContact setObject: uid forKey: @"c_uid"];
|
||||
[compactContacts setObject: returnContact forKey: uid];
|
||||
}
|
||||
if (![[returnContact objectForKey: @"c_name"] length])
|
||||
[returnContact setObject: [userEntry objectForKey: @"c_name"]
|
||||
forKey: @"c_name"];
|
||||
if (![[returnContact objectForKey: @"cn"] length])
|
||||
[returnContact setObject: [userEntry objectForKey: @"c_cn"]
|
||||
forKey: @"cn"];
|
||||
emails = [returnContact objectForKey: @"emails"];
|
||||
if (!emails)
|
||||
{
|
||||
emails = [NSMutableArray array];
|
||||
[returnContact setObject: emails forKey: @"emails"];
|
||||
}
|
||||
email = [userEntry objectForKey: @"mail"];
|
||||
if (email && ![emails containsObject: email])
|
||||
[emails addObject: email];
|
||||
email = [userEntry objectForKey: @"mozillaSecondEmail"];
|
||||
if (email && ![emails containsObject: email])
|
||||
[emails addObject: email];
|
||||
email = [userEntry objectForKey: @"xmozillasecondemail"];
|
||||
if (email && ![emails containsObject: email])
|
||||
[emails addObject: email];
|
||||
}
|
||||
if (![[returnContact objectForKey: @"c_name"] length])
|
||||
[returnContact setObject: [userEntry objectForKey: @"c_name"]
|
||||
forKey: @"c_name"];
|
||||
if (![[returnContact objectForKey: @"cn"] length])
|
||||
[returnContact setObject: [userEntry objectForKey: @"c_cn"]
|
||||
forKey: @"cn"];
|
||||
emails = [returnContact objectForKey: @"emails"];
|
||||
if (!emails)
|
||||
{
|
||||
emails = [NSMutableArray array];
|
||||
[returnContact setObject: emails forKey: @"emails"];
|
||||
}
|
||||
email = [userEntry objectForKey: @"mail"];
|
||||
if (email && ![emails containsObject: email])
|
||||
[emails addObject: email];
|
||||
email = [userEntry objectForKey: @"mozillaSecondEmail"];
|
||||
if (email && ![emails containsObject: email])
|
||||
[emails addObject: email];
|
||||
email = [userEntry objectForKey: @"xmozillasecondemail"];
|
||||
if (email && ![emails containsObject: email])
|
||||
[emails addObject: email];
|
||||
|
||||
userEntry = [contacts nextObject];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user