Minor fixes
Monotone-Parent: 8515028ade639f5e3e38f20b4eba28b16a1250b1 Monotone-Revision: b092fe6aebfa4e00c827df976eaa7e49cb1c6539 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-29T20:39:23 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
9493a33729
commit
d871fe0bd8
|
@ -1145,14 +1145,20 @@ static NSString *spoolFolder = nil;
|
||||||
response = [_ctx response];
|
response = [_ctx response];
|
||||||
[response setStatus: 201];
|
[response setStatus: 201];
|
||||||
msg = [SOGoMailObject objectWithName:
|
msg = [SOGoMailObject objectWithName:
|
||||||
[NSString stringWithFormat: @"%d", imap4id]
|
[NSString stringWithFormat: @"%d", *imap4id]
|
||||||
inContainer: self];
|
inContainer: self];
|
||||||
if (msg)
|
if (msg && [msg doesMailExist])
|
||||||
{
|
{
|
||||||
location = [NSString stringWithFormat: @"%@%d.eml",
|
location = [NSString stringWithFormat: @"%@%d.eml",
|
||||||
[self davURL], *imap4id];
|
[self davURL], *imap4id];
|
||||||
[response setHeader: location forKey: @"location"];
|
[response setHeader: location forKey: @"location"];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
response = (WOResponse *)
|
||||||
|
[NSException exceptionWithHTTPStatus: 500
|
||||||
|
reason: @"Failed to store message"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
|
|
@ -1876,7 +1876,7 @@ function onLoadMailboxesCallback(http) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildMailboxes(accountKeys, encoded) {
|
function buildMailboxes(accountKeys, encoded) {
|
||||||
var account = new Mailbox("account", accountKeys);
|
var account = new Mailbox("account", accountKeys[0], null, accountKeys[1]);
|
||||||
var accountIndex = mailAccounts.indexOf(accountKeys);
|
var accountIndex = mailAccounts.indexOf(accountKeys);
|
||||||
var data = encoded.evalJSON(true);
|
var data = encoded.evalJSON(true);
|
||||||
var mailboxes = data.mailboxes;
|
var mailboxes = data.mailboxes;
|
||||||
|
@ -2288,16 +2288,13 @@ function getMenus() {
|
||||||
|
|
||||||
document.observe("dom:loaded", initMailer);
|
document.observe("dom:loaded", initMailer);
|
||||||
|
|
||||||
function Mailbox(type, name, unseen) {
|
function Mailbox(type, name, unseen, displayName) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
if (typeof (name) == "object" && name.length == 2) {
|
|
||||||
this.name = name[0];
|
|
||||||
this.displayName = name[1];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
if (displayName)
|
||||||
|
this.displayName = displayName;
|
||||||
|
else
|
||||||
this.displayName = name;
|
this.displayName = name;
|
||||||
}
|
|
||||||
this.unseen = unseen;
|
this.unseen = unseen;
|
||||||
this.parentFolder = null;
|
this.parentFolder = null;
|
||||||
this.children = new Array();
|
this.children = new Array();
|
||||||
|
|
Loading…
Reference in a new issue