- Don't print error to the log when trying to delete non-existing draft message

release-0.7
alecpl 13 years ago
parent e877681c20
commit 56ec81cb6f

@ -640,8 +640,7 @@ if ($savedraft)
else
$store_target = isset($_POST['_store_target']) ? get_input_value('_store_target', RCUBE_INPUT_POST) : $CONFIG['sent_mbox'];
if ($store_target)
{
if ($store_target) {
// check if folder is subscribed
if ($IMAP->mailbox_exists($store_target, true))
$store_folder = true;
@ -653,7 +652,6 @@ if ($store_target)
// append message to sent box
if ($store_folder) {
// message body in file
if ($mailbody_file || $MAIL_MIME->getParam('delay_file_io')) {
$headers = $MAIL_MIME->txtHeaders();
@ -700,11 +698,12 @@ if ($store_target)
}
}
if ($olddraftmessageid)
{
if ($olddraftmessageid) {
// delete previous saved draft
$a_deleteid = $IMAP->search_once($CONFIG['drafts_mbox'],
'HEADER Message-ID '.$olddraftmessageid, true);
if (!empty($a_deleteid)) {
$deleted = $IMAP->delete_message($a_deleteid, $CONFIG['drafts_mbox']);
// raise error if deletion of old draft failed
@ -714,14 +713,14 @@ if ($store_target)
'message' => "Could not delete message from ".$CONFIG['drafts_mbox']), TRUE, FALSE);
}
}
}
// remove temp file
else if ($mailbody_file) {
unlink($mailbody_file);
}
if ($savedraft)
{
if ($savedraft) {
$msgid = strtr($message_id, array('>' => '', '<' => ''));
// remember new draft-uid
@ -740,8 +739,7 @@ if ($savedraft)
$OUTPUT->send('iframe');
}
else
{
else {
rcmail_compose_cleanup($COMPOSE_ID);
if ($store_folder && !$saved)
@ -750,5 +748,3 @@ else
$OUTPUT->command('sent_successfully', 'confirmation', rcube_label('messagesent'));
$OUTPUT->send('iframe');
}

Loading…
Cancel
Save