mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-12 23:37:15 +00:00
See ChangeLog
Monotone-Parent: cd39fe0df424d1e5afd5dcfa4b1c94ad707fed24 Monotone-Revision: fc9e1cf3f4988bae25443b6d072add3f344d30f0 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2012-04-24T11:47:32
This commit is contained in:
1 parent
f9d34ea6ec
commit
c774314b1b
8 files changed
+61
-26
No files matched your search
@@ -1658,11 +1658,13 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
- (id) PUTAction: (WOContext *) _ctx
|
||||
{
|
||||
NSException *ex;
|
||||
NSString *etag;
|
||||
NSArray *roles;
|
||||
WORequest *rq;
|
||||
|
||||
id response;
|
||||
|
||||
unsigned int baseVersion;
|
||||
|
||||
rq = [_ctx request];
|
||||
roles = [[context activeUser] rolesForObject: self inContext: context];
|
||||
|
||||
@@ -1961,9 +1963,27 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
}
|
||||
}
|
||||
|
||||
// This will save the event into the database and also handle
|
||||
// E-Tags properly, as well as content versioning.
|
||||
response = [super PUTAction: _ctx];
|
||||
// We must NOT invoke [super PUTAction:] here as it'll resave
|
||||
// the content string and we could have etag mismatches.
|
||||
response = [_ctx response];
|
||||
|
||||
baseVersion = (isNew ? 0 : version);
|
||||
|
||||
ex = [self saveContentString: [rq contentAsString]
|
||||
baseVersion: baseVersion];
|
||||
if (ex)
|
||||
response = (WOResponse *) ex;
|
||||
else
|
||||
{
|
||||
if (isNew)
|
||||
[response setStatus: 201 /* Created */];
|
||||
else
|
||||
[response setStatus: 204 /* No Content */];
|
||||
|
||||
etag = [self davEntityTag];
|
||||
if (etag)
|
||||
[response setHeader: etag forKey: @"etag"];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user