From: wolfgang Date: Fri, 9 Nov 2007 16:12:40 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1257 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d69c0c42cabef8b2038e1e8c0f3e216bc8cd1c4;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1257 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ChangeLog b/ChangeLog index c7e3787f..ac03ed80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2007-11-09 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoObject.m ([SOGoObject + -lookupName:lookupNameinContext:localContextacquire:acquire]): + overriden method to bind looked up keys to So methods but by + avoiding a call to toOneRelationshipKeys. This will be the top + method of the chain, meant to override SoObject's behaviour. + + * SoObjects/Contacts/SOGoContactLDAPFolder.m + ([SOGoContactLDAPFolder + -lookupName:objectNameinContext:lookupContextacquire:acquire]): + removed hack to prevent [super lookupName...] to read the entire + LDAP directory when looking up a record. + 2007-11-08 Wolfgang Sourdeau * SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.h b/SoObjects/Contacts/SOGoContactLDAPFolder.h index e8d61798..c8465e5b 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.h +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.h @@ -34,7 +34,6 @@ { LDAPSource *ldapSource; NSMutableDictionary *entries; - BOOL ignoreSoObjectHunger; } + (id) folderWithName: (NSString *) aName diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index d47883f1..7345c9c5 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -101,7 +101,6 @@ displayName = nil; entries = nil; ldapSource = nil; - ignoreSoObjectHunger = NO; } return self; @@ -153,9 +152,7 @@ //NSLog (@"looking up name '%@'...", objectName); /* first check attributes directly bound to the application */ - ignoreSoObjectHunger = YES; obj = [super lookupName: objectName inContext: lookupContext acquire: NO]; - ignoreSoObjectHunger = NO; if (!obj) { @@ -172,14 +169,7 @@ - (NSArray *) toOneRelationshipKeys { - NSArray *keys; - - if (ignoreSoObjectHunger) - keys = nil; - else - keys = [ldapSource allEntryIDs]; - - return keys; + return [ldapSource allEntryIDs]; } - (NSArray *) _flattenedRecords: (NSArray *) records diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 18aec401..bc62ee22 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -33,6 +33,7 @@ #import #import +#import #import #import #import @@ -552,6 +553,19 @@ static BOOL kontactGroupDAV = YES; return ma; } +- (id) lookupName: (NSString *) lookupName + inContext: (id) localContext + acquire: (BOOL) acquire +{ + id obj; + + obj = [[self soClass] lookupKey: lookupName inContext: localContext]; + if (obj) + [obj bindToObject: self inContext: localContext]; + + return obj; +} + /* looking up shared objects */ - (SOGoUserFolder *) lookupUserFolder