diff --git a/ChangeLog b/ChangeLog index 6da979ca6..cbcc580aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-08-04 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoCalendarComponent.m + ([SOGoCalendarComponent -calendar:create:secure]): we now return a + deep copy of the current calendar element, so that further + modifications do not impact the original copy. + * SoObjects/SOGo/SOGoUser.m ([SOGoUser +initialize]): same as below. diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index dbdffaf56..592cc7693 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -328,7 +328,7 @@ _occurenceHasID (iCalRepeatableEntityObject *occurence, NSString *recID) { NSString *componentTag; iCalRepeatableEntityObject *newComponent; - iCalCalendar **calendar; + iCalCalendar **calendar, *returnedCopy; NSString *iCalString; if (secure) @@ -365,7 +365,10 @@ _occurenceHasID (iCalRepeatableEntityObject *occurence, NSString *recID) } } - return *calendar; + returnedCopy = [*calendar mutableCopy]; + [returnedCopy autorelease]; + + return returnedCopy; } - (id) component: (BOOL) create secure: (BOOL) secure