mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-22 07:14:21 +00:00
Monotone-Parent: 7df1edc5e4fb86c8fe01354ff89b73239e5a4e37
Monotone-Revision: 4ac298b0202fa194faaffcdf551137eb8bdd429b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-29T21:48:00 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
43dfb25589
commit
bdb9169442
9 files changed
+81
-54
No files matched your search
@@ -207,21 +207,24 @@
|
||||
- (NSDictionary *) foldersOfType: (NSString *) type
|
||||
matchingUID: (NSString *) uid
|
||||
{
|
||||
NSArray *contacts, *folders;
|
||||
NSArray *users, *folders;
|
||||
NSString *domain;
|
||||
NSEnumerator *enumerator;
|
||||
NSDictionary *contact;
|
||||
NSDictionary *user;
|
||||
NSMutableDictionary *results;
|
||||
|
||||
results = [NSMutableDictionary dictionary];
|
||||
|
||||
contacts = [[SOGoUserManager sharedUserManager] fetchUsersMatching: uid];
|
||||
enumerator = [contacts objectEnumerator];
|
||||
while ((contact = [enumerator nextObject]))
|
||||
domain = [[SOGoUser userWithLogin: owner] domain];
|
||||
users = [[SOGoUserManager sharedUserManager] fetchUsersMatching: uid
|
||||
inDomain: domain];
|
||||
enumerator = [users objectEnumerator];
|
||||
while ((user = [enumerator nextObject]))
|
||||
{
|
||||
uid = [contact objectForKey: @"c_uid"];
|
||||
uid = [user objectForKey: @"c_uid"];
|
||||
folders = [self foldersOfType: type
|
||||
forUID: [contact objectForKey: @"c_uid"]];
|
||||
[results setObject: folders forKey: contact];
|
||||
forUID: [user objectForKey: @"c_uid"]];
|
||||
[results setObject: folders forKey: user];
|
||||
}
|
||||
|
||||
return results;
|
||||
@@ -312,15 +315,16 @@
|
||||
- (NSArray *) _searchDavOwners: (NSString *) davOwnerMatch
|
||||
{
|
||||
NSArray *users, *owners;
|
||||
NSString *ownerMatch;
|
||||
NSString *ownerMatch, *domain;
|
||||
SOGoUserManager *um;
|
||||
|
||||
owners = [NSMutableArray array];
|
||||
if (davOwnerMatch)
|
||||
{
|
||||
ownerMatch = [self _userFromDAVuser: davOwnerMatch];
|
||||
domain = [[SOGoUser userWithLogin: owner] domain];
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
users = [[um fetchUsersMatching: ownerMatch]
|
||||
users = [[um fetchUsersMatching: ownerMatch inDomain: domain]
|
||||
sortedArrayUsingSelector: @selector (caseInsensitiveDisplayNameCompare:)];
|
||||
owners = [users objectsForKey: @"c_uid" notFoundMarker: nil];
|
||||
}
|
||||
@@ -379,7 +383,7 @@
|
||||
SOGoUserManager *um;
|
||||
NSMutableString *fetch;
|
||||
NSDictionary *currentUser;
|
||||
NSString *field, *login;
|
||||
NSString *field, *login, *domain;
|
||||
NSArray *users;
|
||||
int i;
|
||||
|
||||
@@ -389,9 +393,10 @@
|
||||
login = [[context activeUser] login];
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
|
||||
domain = [[context activeUser] domain];
|
||||
// We sort our array - this is pretty useful for the
|
||||
// SOGo Integrator extension, among other things.
|
||||
users = [[um fetchUsersMatching: user]
|
||||
users = [[um fetchUsersMatching: user inDomain: domain]
|
||||
sortedArrayUsingSelector: @selector (caseInsensitiveDisplayNameCompare:)];
|
||||
for (i = 0; i < [users count]; i++)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user