diff --git a/ChangeLog b/ChangeLog index 7fed1acab..6f1b9de6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-10-27 Wolfgang Sourdeau + * UI/Contacts/UIxContactEditor.m: check whether the client contact + folder has selector "globallyUniqueObjectId" before calling that + method. + * SoObjects/Contacts/SOGoContactLDAPEntry.m ([SOGoContactLDAPEntry -vCard]): the "setVClass" NGVCard method really is "setClass" instead. diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index da0595eae..275e68a25 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -521,13 +521,18 @@ Update: remember that there are group folders as well. */ NSString *uri, *objectId, *nextMethod; - - objectId = [[[self clientObject] class] globallyUniqueObjectId]; - if ([objectId length] == 0) { + id co; + + co = [self clientObject]; + if ([[co class] respondsToSelector: @selector (globallyUniqueObjectId)]) + objectId = [[[self clientObject] class] globallyUniqueObjectId]; + else + objectId = nil; + + if ([objectId length] == 0) return [NSException exceptionWithHTTPStatus:500 /* Internal Error */ - reason:@"could not create a unique ID"]; - } - + reason:@"could not create a unique ID"]; + nextMethod = [NSString stringWithFormat:@"../%@/%@", objectId, [self editActionName]]; uri = [self _completeURIForMethod:nextMethod];