+2007-11-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * 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 <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder
{
LDAPSource *ldapSource;
NSMutableDictionary *entries;
- BOOL ignoreSoObjectHunger;
}
+ (id) folderWithName: (NSString *) aName
displayName = nil;
entries = nil;
ldapSource = nil;
- ignoreSoObjectHunger = NO;
}
return self;
//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)
{
- (NSArray *) toOneRelationshipKeys
{
- NSArray *keys;
-
- if (ignoreSoObjectHunger)
- keys = nil;
- else
- keys = [ldapSource allEntryIDs];
-
- return keys;
+ return [ldapSource allEntryIDs];
}
- (NSArray *) _flattenedRecords: (NSArray *) records
#import <Foundation/NSURL.h>
#import <Foundation/NSValue.h>
+#import <NGObjWeb/SoClass.h>
#import <NGObjWeb/SoClassSecurityInfo.h>
#import <NGObjWeb/SoObject+SoDAV.h>
#import <NGObjWeb/WEClientCapabilities.h>
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