mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-06 00:45:09 +00:00
Monotone-Parent: b96dba727aa69371c7559cd35197a0904e11b368
Monotone-Revision: 25301be77706f7c3801e36031343c4b9a772df83 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-05-28T13:16:51 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -579,57 +579,6 @@ static int attachmentFlagSize = 8096;
|
||||
return [self redirectToLocation:@"view"];
|
||||
}
|
||||
|
||||
/* folder operations */
|
||||
|
||||
- (id) createFolderAction
|
||||
{
|
||||
NSException *error;
|
||||
NSString *folderName;
|
||||
id client;
|
||||
|
||||
folderName = [[[self context] request] formValueForKey:@"name"];
|
||||
if ([folderName length] == 0) {
|
||||
error = [NSException exceptionWithHTTPStatus:400 /* Bad Request */
|
||||
reason:@"missing 'name' query parameter!"];
|
||||
return [self redirectToViewWithError:error];
|
||||
}
|
||||
|
||||
if ((client = [self clientObject]) == nil) {
|
||||
error = [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
reason:@"did not find mail folder"];
|
||||
return [self redirectToViewWithError:error];
|
||||
}
|
||||
|
||||
if ((error = [[self clientObject] davCreateCollection:folderName
|
||||
inContext:[self context]]) != nil) {
|
||||
return [self redirectToViewWithError:error];
|
||||
}
|
||||
|
||||
return [self redirectToLocation:[folderName stringByAppendingString:@"/"]];
|
||||
}
|
||||
|
||||
- (id) deleteFolderAction
|
||||
{
|
||||
NSException *error;
|
||||
NSString *url;
|
||||
id client;
|
||||
|
||||
if ((client = [self clientObject]) == nil) {
|
||||
error = [NSException exceptionWithHTTPStatus:404 /* Not Found */
|
||||
reason:@"did not find mail folder"];
|
||||
return [self redirectToViewWithError:error];
|
||||
}
|
||||
|
||||
/* jump to parent folder afterwards */
|
||||
url = [[client container] baseURLInContext:[self context]];
|
||||
if (![url hasSuffix:@"/"]) url = [url stringByAppendingString:@"/"];
|
||||
|
||||
if ((error = [[self clientObject] delete]) != nil)
|
||||
return [self redirectToViewWithError:error];
|
||||
|
||||
return [self redirectToLocation:url];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/* UIxMailListView */
|
||||
|
||||
Reference in New Issue
Block a user