diff --git a/ChangeLog b/ChangeLog index faec68d32..7481b84e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-07-09 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoContentObject.m ([SOGoContentObject + -PUTAction:_ctx]): increment the version number only if the record + is not new. + * SoObjects/Appointments/SOGoAppointmentFolder.m ([SOGoAppointmentFolder -davCalendarFreeBusySet]): new method that returns the HREF to the calendars involved in the user's freebusy. diff --git a/SoObjects/Appointments/SOGoAppointmentFolders.m b/SoObjects/Appointments/SOGoAppointmentFolders.m index 5490f021e..d0dd127b9 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolders.m +++ b/SoObjects/Appointments/SOGoAppointmentFolders.m @@ -23,6 +23,10 @@ #import #import +#import +#import +#import + #import "SOGoAppointmentFolder.h" #import "SOGoAppointmentFolders.h" @@ -44,6 +48,42 @@ return [self labelForKey: @"Personal Calendar"]; } +- (id) lookupName: (NSString *) name + inContext: (WOContext *) lookupContext + acquire: (BOOL) acquire +{ + id obj; + WORequest *rq; + + obj = [super lookupName: name inContext: lookupContext acquire: NO]; + + rq = [context request]; + if ([rq isSoWebDAVRequest] + && [[rq method] isEqualToString: @"MKCALENDAR"]) + { + if (obj) + obj = [NSException exceptionWithHTTPStatus: 403]; + else + { + obj = [self newFolderWithName: name andNameInContainer: name]; + if (!obj) + obj = [super lookupName: name inContext: lookupContext acquire: NO]; + } + } + + return obj; +} + +- (id) doMKCALENDAR: (id) test +{ + return nil; +} + +- (id) MKCALENDARAction: (id) localContext +{ + return nil; +} + #warning THIS CAUSES LIGHTNING TO FAIL (that is why its commented out) // - (NSArray *) davComplianceClassesInContext: (id)_ctx // { diff --git a/SoObjects/SOGo/SOGoContentObject.m b/SoObjects/SOGo/SOGoContentObject.m index d4c6e82db..e3e36605c 100644 --- a/SoObjects/SOGo/SOGoContentObject.m +++ b/SoObjects/SOGo/SOGoContentObject.m @@ -306,7 +306,8 @@ response = (WOResponse *) error; else { - version++; + if (!isNew) + version++; response = [_ctx response]; /* setup response */