From f0b0357de9276844e5e8db0891aa9fd10c9fa1d3 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 27 Oct 2006 18:12:13 +0000 Subject: [PATCH] Monotone-Parent: f2ca93f05f1dd7d6b8d2096ea437d4d62ce8e785 Monotone-Revision: 57d579bea2427c6ad84d4c56e0d2fe8b5a410b4e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-27T18:12:13 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/Contacts/UIxContactEditor.m | 17 +++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) 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];