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];