Monotone-Parent: f193f6c3ce89a0f9ac050e35347fefbc8cbdec84

Monotone-Revision: e9fa1043e9534cb3eec34f44262b47fc5fd63efe

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-11-23T08:33:08
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-11-23 08:33:08 +00:00
parent 2454d8aaef
commit 94d3464658
2 changed files with 22 additions and 9 deletions
+10
View File
@@ -1,3 +1,13 @@
2008-11-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/LDAPUserManager.m ([LDAPUserManager
+initialize]): we need to retain the LDAPContactInfoAttribute
static var, to avoid a zombie.
([LDAPUserManager -fetchContactsMatching:filter])
([LDAPUserManager -fetchUsersMatching:filter]): the info attribute
is returned if the related entry does NOT contain it yet: the test
was reverted.
2008-11-22 Ludovic Marcotte <lmarcotte@inverse.ca>
* Modified the invitation "update" templates
+12 -9
View File
@@ -60,6 +60,7 @@ static BOOL forceImapLoginWithEmail = NO;
}
LDAPContactInfoAttribute = [ud stringForKey: @"SOGoLDAPContactInfoAttribute"];
[LDAPContactInfoAttribute retain];
}
if (!forceImapLoginWithEmail)
forceImapLoginWithEmail = [ud boolForKey: @"SOGoForceIMAPLoginWithEmail"];
@@ -470,11 +471,10 @@ static BOOL forceImapLoginWithEmail = NO;
NSDictionary *userEntry;
NSArray *newContacts;
NSMutableArray *emails;
NSString *uid, *email;
NSString *uid, *email, *infoAttribute;
compactContacts = [NSMutableDictionary dictionary];
userEntry = [contacts nextObject];
while (userEntry)
while ((userEntry = [contacts nextObject]))
{
uid = [userEntry objectForKey: @"c_uid"];
if ([uid length])
@@ -507,14 +507,17 @@ static BOOL forceImapLoginWithEmail = NO;
email = [userEntry objectForKey: @"xmozillasecondemail"];
if (email && ![emails containsObject: email])
[emails addObject: email];
if ([LDAPContactInfoAttribute length] > 0 &&
[[returnContact objectForKey: LDAPContactInfoAttribute] length] > 0 &&
[userEntry objectForKey: LDAPContactInfoAttribute] != nil)
[returnContact setObject: [userEntry objectForKey: LDAPContactInfoAttribute]
if ([LDAPContactInfoAttribute length]
&& ![[returnContact
objectForKey: LDAPContactInfoAttribute] length])
{
infoAttribute
= [userEntry objectForKey: LDAPContactInfoAttribute];
if ([infoAttribute length])
[returnContact setObject: infoAttribute
forKey: LDAPContactInfoAttribute];
}
}
userEntry = [contacts nextObject];
}
newContacts = [compactContacts allValues];
[self _fillContactsMailRecords: [newContacts objectEnumerator]];