From 12dc73a01f2b436b49906a584b944367978b7344 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 13 Apr 2009 13:10:16 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 795fdd1b62319c12f9aef930c35c63d2fd26c3ac Monotone-Revision: e290f01a5006f7dc9a5dec96622f04d6bcdb008c Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-04-13T13:10:16 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ SoObjects/Contacts/SOGoContactLDAPFolder.m | 2 +- SoObjects/SOGo/LDAPSource.h | 2 +- SoObjects/SOGo/LDAPSource.m | 6 +++--- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d4c82079..8bde7e7c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-04-13 Ludovic Marcotte + + * SoObjects/Contacts/SOGoContactLDAPFolder.m and + SoObjects/SOGo/LDAPSource.h: renamed allEntryIDs to + allEntryUIDs and we now use the UID instead of the ID + when returning all entries since when the callback + is invoked, we use the UID and NOT the ID. + 2009-04-09 Ludovic Marcotte * Reverted previous patch and provided the correct diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index a55464386..f5bdaad9c 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -190,7 +190,7 @@ - (NSArray *) toOneRelationshipKeys { - return [ldapSource allEntryIDs]; + return [ldapSource allEntryUIDs]; } - (NSArray *) _flattenedRecords: (NSArray *) records diff --git a/SoObjects/SOGo/LDAPSource.h b/SoObjects/SOGo/LDAPSource.h index df4ebc100..b56dd734c 100644 --- a/SoObjects/SOGo/LDAPSource.h +++ b/SoObjects/SOGo/LDAPSource.h @@ -74,7 +74,7 @@ - (NSDictionary *) lookupContactEntry: (NSString *) entryID; - (NSDictionary *) lookupContactEntryWithUIDorEmail: (NSString *) entryID; -- (NSArray *) allEntryIDs; +- (NSArray *) allEntryUIDs; - (NSArray *) fetchContactsMatching: (NSString *) filter; - (NSString *) sourceID; diff --git a/SoObjects/SOGo/LDAPSource.m b/SoObjects/SOGo/LDAPSource.m index d84743ca6..20c14030e 100644 --- a/SoObjects/SOGo/LDAPSource.m +++ b/SoObjects/SOGo/LDAPSource.m @@ -517,7 +517,7 @@ static NSLock *lock; return searchAttributes; } -- (NSArray *) allEntryIDs +- (NSArray *) allEntryUIDs { NSMutableArray *ids; NSEnumerator *entries; @@ -534,7 +534,7 @@ static NSLock *lock; { NSArray *attributes; - attributes = [NSArray arrayWithObject: IDField]; + attributes = [NSArray arrayWithObject: UIDField]; if ([_scope caseInsensitiveCompare: @"BASE"] == NSOrderedSame) entries = [ldapConnection baseSearchAtBaseDN: baseDN qualifier: nil @@ -556,7 +556,7 @@ static NSLock *lock; currentEntry = [entries nextObject]; while (currentEntry) { - value = [[currentEntry attributeWithName: IDField] + value = [[currentEntry attributeWithName: UIDField] stringValueAtIndex: 0]; if ([value length] > 0) [ids addObject: value];