mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 19:35:38 +00:00
Monotone-Parent: 3edbc90046db007b2cea7d85505ba6bcecec6dd7
Monotone-Revision: 99eb9661017e4e4371b678e9d5c89d54eb0762c5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-04T18:22:06 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-07-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoObject.m ([SOGoObject
|
||||
-POSTAction:localContext]): take the content type as well as the
|
||||
request and pass them as parameter to the new method below.
|
||||
|
||||
2008-06-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||
|
||||
@@ -1901,27 +1901,23 @@ _selectorForProperty (NSString *property)
|
||||
return [self _caldavScheduleResponse: tags];
|
||||
}
|
||||
|
||||
- (id) POSTAction: (id) localContext
|
||||
- (id) davPOSTRequest: (WORequest *) request
|
||||
withContentType: (NSString *) cType
|
||||
inContext: (WOContext *) localContext
|
||||
{
|
||||
id obj;
|
||||
NSString *cType;
|
||||
WORequest *rq;
|
||||
iCalCalendar *calendar;
|
||||
|
||||
obj = nil;
|
||||
|
||||
rq = [localContext request];
|
||||
if ([rq isSoWebDAVRequest])
|
||||
if ([cType hasPrefix: @"text/calendar"])
|
||||
{
|
||||
cType = [rq headerForKey: @"content-type"];
|
||||
if ([cType hasPrefix: @"text/calendar"])
|
||||
{
|
||||
calendar
|
||||
= [iCalCalendar parseSingleFromSource: [rq contentAsString]];
|
||||
obj = [self caldavScheduleRequest: rq
|
||||
withCalendar: calendar];
|
||||
}
|
||||
calendar
|
||||
= [iCalCalendar parseSingleFromSource: [request contentAsString]];
|
||||
obj = [self caldavScheduleRequest: request
|
||||
withCalendar: calendar];
|
||||
}
|
||||
else
|
||||
obj = [super davPOSTRequest: request withContentType: cType
|
||||
inContext: localContext];
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
@class NSURL;
|
||||
|
||||
@class WOContext;
|
||||
@class WORequest;
|
||||
@class GCSFolderManager;
|
||||
@class GCSFolder;
|
||||
|
||||
@@ -136,6 +137,10 @@
|
||||
|
||||
- (NSArray *) davComplianceClassesInContext: (WOContext *) localContext;
|
||||
|
||||
- (id) davPOSTRequest: (WORequest *) request
|
||||
withContentType: (NSString *) cType
|
||||
inContext: (WOContext *) localContext;
|
||||
|
||||
/* dav acls */
|
||||
- (SOGoWebDAVValue *) davCurrentUserPrivilegeSet;
|
||||
|
||||
|
||||
+27
-15
@@ -771,30 +771,42 @@ static NSDictionary *reportMap = nil;
|
||||
return [NSString stringWithFormat: @"%@:", command];
|
||||
}
|
||||
|
||||
- (id) POSTAction: (id) localContext
|
||||
- (id) davPOSTRequest: (WORequest *) request
|
||||
withContentType: (NSString *) cType
|
||||
inContext: (WOContext *) localContext
|
||||
{
|
||||
id obj;
|
||||
NSString *cType, *command;
|
||||
id <DOMDocument> document;
|
||||
SEL commandSel;
|
||||
WORequest *rq;
|
||||
NSString *command;
|
||||
|
||||
obj = nil;
|
||||
|
||||
if ([cType hasPrefix: @"application/xml"]
|
||||
|| [cType hasPrefix: @"text/xml"])
|
||||
{
|
||||
document = [request contentAsDOMDocument];
|
||||
command = [[self _parseXMLCommand: document] davMethodToObjC];
|
||||
commandSel = NSSelectorFromString (command);
|
||||
if ([self respondsToSelector: commandSel])
|
||||
obj = [self performSelector: commandSel withObject: localContext];
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
- (id) POSTAction: (id) localContext
|
||||
{
|
||||
WORequest *rq;
|
||||
id obj;
|
||||
|
||||
rq = [localContext request];
|
||||
if ([rq isSoWebDAVRequest])
|
||||
{
|
||||
cType = [rq headerForKey: @"content-type"];
|
||||
if ([cType hasPrefix: @"application/xml"]
|
||||
|| [cType hasPrefix: @"text/xml"])
|
||||
{
|
||||
document = [rq contentAsDOMDocument];
|
||||
command = [[self _parseXMLCommand: document] davMethodToObjC];
|
||||
commandSel = NSSelectorFromString (command);
|
||||
if ([self respondsToSelector: commandSel])
|
||||
obj = [self performSelector: commandSel withObject: localContext];
|
||||
}
|
||||
}
|
||||
obj = [self davPOSTRequest: rq
|
||||
withContentType: [rq headerForKey: @"content-type"]
|
||||
inContext: localContext];
|
||||
else
|
||||
obj = nil;
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user