mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-20 06:03:20 +00:00
Monotone-Parent: c85409f639b55299e3ece362140e6725f6c43cbb
Monotone-Revision: 660b741557d301814eebace414a974e674f53a7b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-17T02:33:44 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
error = [connection createMailbox: folderName atURL: [co imap4URL]];
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 403];
|
||||
[response setStatus: 500];
|
||||
[response appendContentString: @"Unable to create folder."];
|
||||
}
|
||||
else
|
||||
@@ -66,7 +66,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
[response setStatus: 403];
|
||||
[response setStatus: 500];
|
||||
[response appendContentString: @"Missing 'name' parameter."];
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
toURL: destURL];
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 403];
|
||||
[response setStatus: 500];
|
||||
[response appendContentString: @"Unable to rename folder."];
|
||||
}
|
||||
else
|
||||
@@ -120,7 +120,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
[response setStatus: 403];
|
||||
[response setStatus: 500];
|
||||
[response appendContentString: @"Missing 'name' parameter."];
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
toURL: destURL];
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 403];
|
||||
[response setStatus: 500];
|
||||
[response appendContentString: @"Unable to move folder."];
|
||||
}
|
||||
else
|
||||
@@ -173,6 +173,30 @@
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) expungeAction
|
||||
{
|
||||
NSException *error;
|
||||
SOGoTrashFolder *co;
|
||||
WOResponse *response;
|
||||
|
||||
co = [self clientObject];
|
||||
response = [context response];
|
||||
|
||||
error = [co expunge];
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 500];
|
||||
[response appendContentString: @"Unable to expunge folder."];
|
||||
}
|
||||
else
|
||||
{
|
||||
[co flushMailCaches];
|
||||
[response setStatus: 204];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) emptyTrashAction
|
||||
{
|
||||
NSException *error;
|
||||
@@ -202,7 +226,7 @@
|
||||
}
|
||||
if (error)
|
||||
{
|
||||
[response setStatus: 403];
|
||||
[response setStatus: 500];
|
||||
[response appendContentString: @"Unable to empty the trash folder."];
|
||||
}
|
||||
else
|
||||
@@ -233,7 +257,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
[response setStatus: 403];
|
||||
[response setStatus: 500];
|
||||
[response appendContentString: @"How did you end up here?"];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user