summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-08-13 17:00:35 +0000
committeralecpl <alec@alec.pl>2008-08-13 17:00:35 +0000
commit9a5762a4de13a23a45ac9b85ff475aaf877cf906 (patch)
tree455bdb1323e1264c4a7936369570e803665b2a8c
parent7c2d30b2e106a23fe2ab295f7dc2e628e4d828bb (diff)
#1485242: better handling of situation when message was sent successfully but cannot be saved
-rw-r--r--program/js/app.js4
-rw-r--r--program/localization/en_GB/messages.inc1
-rw-r--r--program/localization/en_US/messages.inc1
-rw-r--r--program/localization/pl_PL/messages.inc3
-rw-r--r--program/steps/mail/sendmail.inc12
5 files changed, 15 insertions, 6 deletions
diff --git a/program/js/app.js b/program/js/app.js
index a86f41c5c..58d117591 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2206,10 +2206,10 @@ function rcube_webmail()
};
- this.sent_successfully = function(msg)
+ this.sent_successfully = function(type, msg)
{
this.list_mailbox();
- this.display_message(msg, 'confirmation', true);
+ this.display_message(msg, type, true);
}
diff --git a/program/localization/en_GB/messages.inc b/program/localization/en_GB/messages.inc
index c763d0126..8ee5d8e24 100644
--- a/program/localization/en_GB/messages.inc
+++ b/program/localization/en_GB/messages.inc
@@ -40,6 +40,7 @@ $messages['encryptedmessage'] = 'This is an encrypted message and can not be dis
$messages['nocontactsfound'] = 'No contacts found';
$messages['contactnotfound'] = 'The requested contact was not found';
$messages['sendingfailed'] = 'Failed to send message';
+$messages['errorsavingsent'] = 'An error occured while saving sent message';
$messages['errorsaving'] = 'An error occured while saving';
$messages['errormoving'] = 'Could not move the message';
$messages['errordeleting'] = 'Could not delete the message';
diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc
index d7b3f0380..8777bb17a 100644
--- a/program/localization/en_US/messages.inc
+++ b/program/localization/en_US/messages.inc
@@ -40,6 +40,7 @@ $messages['encryptedmessage'] = 'This is an encrypted message and can not be dis
$messages['nocontactsfound'] = 'No contacts found';
$messages['contactnotfound'] = 'The requested contact was not found';
$messages['sendingfailed'] = 'Failed to send message';
+$messages['errorsavingsent'] = 'An error occured while saving sent message';
$messages['errorsaving'] = 'An error occured while saving';
$messages['errormoving'] = 'Could not move the message';
$messages['errordeleting'] = 'Could not delete the message';
diff --git a/program/localization/pl_PL/messages.inc b/program/localization/pl_PL/messages.inc
index be8d04d0b..8b52e30be 100644
--- a/program/localization/pl_PL/messages.inc
+++ b/program/localization/pl_PL/messages.inc
@@ -45,7 +45,8 @@ $messages['encryptedmessage'] = 'Przepraszamy, nie można wyświetlić zaszyfrow
$messages['nocontactsfound'] = 'Nie znaleziono kontaktu!';
$messages['contactnotfound'] = 'Szukany kontakt nie został odnaleziony';
$messages['sendingfailed'] = 'Nie udało się wysłać wiadomości!';
-$messages['errorsaving'] = 'Błąd podczas zapisu!';
+$messages['errorsavingsent'] = 'Wystąpił błąd podczas zapisu wysłanej wiadomości!';
+$messages['errorsaving'] = 'Wystąpił błąd podczas zapisu!';
$messages['errormoving'] = 'Nie można przenieść wybranej wiadomości!';
$messages['errordeleting'] = 'Nie można usunąć wiadomości!';
$messages['deletecontactconfirm'] = 'Czy na pewno chcesz usunąć wybrane kontakty?';
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 090919e35..9888c5a97 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -377,8 +377,10 @@ if ($store_target)
raise_error(array('code' => 800, 'type' => 'imap', 'file' => __FILE__,
'message' => "Could not save message in $store_target"), TRUE, FALSE);
- $OUTPUT->show_message('errorsaving', 'error');
- $OUTPUT->send('iframe');
+ if ($savedraft) {
+ $OUTPUT->show_message('errorsaving', 'error');
+ $OUTPUT->send('iframe');
+ }
}
if ($olddraftmessageid)
@@ -434,7 +436,11 @@ else
}
rcmail_compose_cleanup();
- $OUTPUT->command('sent_successfully', rcube_label('messagesent'));
+
+ if ($store_folder && !$saved)
+ $OUTPUT->command('sent_successfully', 'error', rcube_label('errorsavingsent'));
+ else
+ $OUTPUT->command('sent_successfully', 'confirmation', rcube_label('messagesent'));
$OUTPUT->send('iframe');
}