From 82be9a876a00d831603e9b1af5c3f289a2c34366 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 20 Jul 2007 20:21:59 +0000 Subject: [PATCH] Monotone-Parent: 3c4bff66182b49f279964724e065b9b9a5bd8022 Monotone-Revision: 3e115caf9292772485392f689415b1620ec81d9e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-20T20:21:59 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/Contacts/SOGoContactLDAPFolder.m | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) 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