diff --git a/ChangeLog b/ChangeLog index e0a3bda96..8cce529f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-11-13 Wolfgang Sourdeau + + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor + -setComponent:newComponent]): check that newComponent is non-nil + before replacing the default values. + ([UIxComponentEditor -calendarList]): privacy is already an ivar. + We don't need to refetch it. + 2007-11-12 Wolfgang Sourdeau * SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 0c07730d8..70ddaa55c 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -148,18 +148,20 @@ co = [self clientObject]; componentOwner = [co ownerInContext: nil]; - - ASSIGN (title, [component summary]); - ASSIGN (location, [component location]); - ASSIGN (comment, [component comment]); - ASSIGN (url, [[component url] absoluteString]); - ASSIGN (privacy, [component accessClass]); - ASSIGN (priority, [component priority]); - ASSIGN (status, [component status]); - ASSIGN (categories, [[component categories] commaSeparatedValues]); - ASSIGN (organizer, [component organizer]); - [self _loadCategories]; - [self _loadAttendees]; + if (component) + { + ASSIGN (title, [component summary]); + ASSIGN (location, [component location]); + ASSIGN (comment, [component comment]); + ASSIGN (url, [[component url] absoluteString]); + ASSIGN (privacy, [component accessClass]); + ASSIGN (priority, [component priority]); + ASSIGN (status, [component status]); + ASSIGN (categories, [[component categories] commaSeparatedValues]); + ASSIGN (organizer, [component organizer]); + [self _loadCategories]; + [self _loadAttendees]; + } } // /* cycles */ // if ([component isRecurrent]) @@ -336,7 +338,7 @@ SOGoAppointmentFolders *calendarParent; NSEnumerator *allCalendars; SoSecurityManager *sm; - NSString *perm, *privacy; + NSString *perm; if (!calendarList) { @@ -344,7 +346,6 @@ if ([[self clientObject] isNew]) perm = SoPerm_AddDocumentsImagesAndFiles; else { - privacy = [component accessClass]; if ([privacy isEqualToString: @"PRIVATE"]) perm = SOGoCalendarPerm_ModifyPrivateRecords; else if ([privacy isEqualToString: @"CONFIDENTIAL"])