diff --git a/ChangeLog b/ChangeLog index cfc4cf35c..fd43c38ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-20 Wolfgang Sourdeau + + * SoObjects/Contacts/SOGoContactLDAPFolder.m + ([SOGoContactLDAPFolder -toOneRelationshipKeys]): check whether we + really should return something or if we fake to return nil... + 2007-07-13 Wolfgang Sourdeau * SoObjects/SOGo/SOGoUser.m ([SOGoUser +initialize]): set diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index 391336392..60e4ee988 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -73,6 +73,7 @@ displayName = nil; entries = nil; ldapSource = nil; + ignoreSoObjectHunger = NO; } return self; @@ -119,7 +120,9 @@ // NSLog (@"looking up name '%@'...", name); /* first check attributes directly bound to the application */ + ignoreSoObjectHunger = YES; obj = [super lookupName: objectName inContext: lookupContext acquire: NO]; + ignoreSoObjectHunger = NO; if (!obj) { ldifEntry = [ldapSource lookupContactEntry: objectName]; @@ -135,7 +138,14 @@ - (NSArray *) toOneRelationshipKeys { - return [ldapSource allEntryIDs]; + NSArray *keys; + + if (ignoreSoObjectHunger) + keys = nil; + else + keys = [ldapSource allEntryIDs]; + + return keys; } - (NSArray *) lookupContactsWithFilter: (NSString *) filter