diff --git a/ChangeLog b/ChangeLog index 461826f73..85c0e71a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-08-10 Wolfgang Sourdeau + + * SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder + -lookupName:_keyinContext:_ctxacquire:_flag]): when the HTTP + request is a PUT, always create an entry, even if we're not sure + it does exist. + 2006-08-09 Wolfgang Sourdeau * UI/WebServerResources/ContactsUI.js: implemented live-search. diff --git a/SoObjects/Contacts/SOGoContactGCSFolder.m b/SoObjects/Contacts/SOGoContactGCSFolder.m index 780d783eb..822c3f422 100644 --- a/SoObjects/Contacts/SOGoContactGCSFolder.m +++ b/SoObjects/Contacts/SOGoContactGCSFolder.m @@ -93,15 +93,24 @@ } - (id) lookupName: (NSString *) _key - inContext: (id) _ctx + inContext: (WOContext *) _ctx acquire: (BOOL) _flag { id obj; - + /* first check attributes directly bound to the application */ obj = [super lookupName:_key inContext:_ctx acquire:NO]; if (!obj) - obj = [self lookupContactWithId: _key]; + { + if ([[[_ctx request] method] isEqualToString: @"PUT"]) + { + obj = [[SOGoContactGCSEntry alloc] initWithName: _key + inContainer: self]; + [obj autorelease]; + } + else + obj = [self lookupContactWithId: _key]; + } if (!obj) obj = [NSException exceptionWithHTTPStatus:404 /* Not Found */];