mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-26 15:29:31 +00:00
Monotone-Parent: acf6003d2dca73186ecece884f034aee4351372c
Monotone-Revision: 9e946c46691afd745f601eae3b1973a26f7494e4 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-09-28T15:07:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2010-09-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailerUI/UIxMailFolderActions.m (-createFolderAction):
|
||||
modified to make use of -[SOGoMailFolder create].
|
||||
|
||||
* SoObjects/Mailer/SOGoMailObject.m (-displayName): new accessor.
|
||||
|
||||
* SoObjects/Mailer/SOGoMailFolder.m (-displayName): fixed accessor
|
||||
|
||||
@@ -53,35 +53,26 @@
|
||||
|
||||
- (WOResponse *) createFolderAction
|
||||
{
|
||||
SOGoMailFolder *co;
|
||||
SOGoMailFolder *co, *newFolder;
|
||||
WOResponse *response;
|
||||
NGImap4Connection *connection;
|
||||
NSException *error;
|
||||
NSString *folderName, *path;
|
||||
NSString *folderName;
|
||||
|
||||
co = [self clientObject];
|
||||
|
||||
folderName = [[context request] formValueForKey: @"name"];
|
||||
if ([folderName length] > 0)
|
||||
{
|
||||
connection = [co imap4Connection];
|
||||
error = [connection createMailbox: folderName atURL: [co imap4URL]];
|
||||
if (error)
|
||||
newFolder
|
||||
= [co lookupName: [NSString stringWithFormat: @"folder%@", folderName]
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
if ([newFolder create])
|
||||
response = [self responseWith204];
|
||||
else
|
||||
{
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Unable to create folder."];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([co respondsToSelector: @selector (absoluteImap4Name)])
|
||||
path = [NSString stringWithFormat: @"%@%@",
|
||||
[co absoluteImap4Name], folderName];
|
||||
else
|
||||
path = folderName;
|
||||
[[connection client] subscribe: path];
|
||||
|
||||
response = [self responseWith204];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user