Monotone-Parent: 1f91242358ebeca578ffc5dde26b559bab4046ca

Monotone-Revision: 58ca9ef1246b86b1823a3325ab222fa6361a4604

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-08-07T16:07:43
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-08-07 16:07:43 +00:00
parent 40de28b4d8
commit f1be9d827f
2 changed files with 21 additions and 17 deletions
+6
View File
@@ -1,5 +1,11 @@
2008-08-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/LDAPUserManager.m ([LDAPUserManager
-fetchContactsMatching:filter]): fetch entries matching filter
only in addressbooks.
([LDAPUserManager -fetchUsersMatching:filter]): same as above for
authentication sources only.
* SoObjects/Appointments/SOGoUserFolder+Appointments.m
([SOGoUserFolder -davCalendarUserAddressSet]): the addresses
returned should be those of the owner and not of the current user.
+15 -17
View File
@@ -499,22 +499,8 @@ static BOOL forceImapLoginWithEmail = NO;
return newContacts;
}
- (NSArray *) fetchContactsMatching: (NSString *) filter
{
NSMutableArray *contacts;
NSEnumerator *ldapSources;
LDAPSource *currentSource;
contacts = [NSMutableArray array];
ldapSources = [sources objectEnumerator];
while ((currentSource = [ldapSources nextObject]))
[contacts addObjectsFromArray:
[currentSource fetchContactsMatching: filter]];
return [self _compactAndCompleteContacts: [contacts objectEnumerator]];
}
- (NSArray *) fetchUsersMatching: (NSString *) filter
- (NSArray *) _fetchEntriesInSources: (NSArray *) sourcesList
matching: (NSString *) filter
{
NSMutableArray *contacts;
NSEnumerator *ldapSources;
@@ -522,7 +508,7 @@ static BOOL forceImapLoginWithEmail = NO;
LDAPSource *currentSource;
contacts = [NSMutableArray array];
ldapSources = [[self authenticationSourceIDs] objectEnumerator];
ldapSources = [sourcesList objectEnumerator];
while ((sourceID = [ldapSources nextObject]))
{
currentSource = [sources objectForKey: sourceID];
@@ -533,6 +519,18 @@ static BOOL forceImapLoginWithEmail = NO;
return [self _compactAndCompleteContacts: [contacts objectEnumerator]];
}
- (NSArray *) fetchContactsMatching: (NSString *) filter
{
return [self _fetchEntriesInSources: [self addressBookSourceIDs]
matching: filter];
}
- (NSArray *) fetchUsersMatching: (NSString *) filter
{
return [self _fetchEntriesInSources: [self authenticationSourceIDs]
matching: filter];
}
- (void) cleanupSources
{
NSEnumerator *userIDs;