]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1257 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 9 Nov 2007 16:12:40 +0000 (16:12 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 9 Nov 2007 16:12:40 +0000 (16:12 +0000)
ChangeLog
SoObjects/Contacts/SOGoContactLDAPFolder.h
SoObjects/Contacts/SOGoContactLDAPFolder.m
SoObjects/SOGo/SOGoObject.m

index c7e3787f186c0c07175f5fe900dbda17033dbfcd..ac03ed80ddacd32a9c1a4943706c6d647e4a9752 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+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
index e8d61798f2b50895a6dc28e4461a0aec4c019091..c8465e5bd44e4ed33a9928d6c09dc6cc11d7036d 100644 (file)
@@ -34,7 +34,6 @@
 {
   LDAPSource *ldapSource;
   NSMutableDictionary *entries;
-  BOOL ignoreSoObjectHunger;
 }
 
 + (id) folderWithName: (NSString *) aName
index d47883f159689c8e7f3690403f8518e47bda1ecd..7345c9c5a34ba18fe2b2547a5a5ce8b1412596a5 100644 (file)
       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
index 18aec4014d07baed2950c851b1aedb662425fa21..bc62ee2246415a515970813e7db561a2d4e3303a 100644 (file)
@@ -33,6 +33,7 @@
 #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>
@@ -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