summaryrefslogtreecommitdiff
path: root/program/steps/mail/sendmail.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-04-24 10:08:16 +0000
committeralecpl <alec@alec.pl>2012-04-24 10:08:16 +0000
commitdb70b3fc823f632c4c74de53af471197e98dcfa9 (patch)
tree3ccf22e793c34694375091d962f8daa346b1ecda /program/steps/mail/sendmail.inc
parent988a80ad673ff77e2d3027098e245be8a15aaf33 (diff)
- Fix handling errors on draft auto-save
Diffstat (limited to 'program/steps/mail/sendmail.inc')
-rw-r--r--program/steps/mail/sendmail.inc20
1 files changed, 11 insertions, 9 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index bb2bd2732..faaeddcda 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -698,17 +698,19 @@ if ($store_target) {
unlink($mailbody_file);
$mailbody_file = null;
}
+ }
- // raise error if saving failed
- if (!$saved) {
- raise_error(array('code' => 800, 'type' => 'imap',
- 'file' => __FILE__, 'line' => __LINE__,
- 'message' => "Could not save message in $store_target"), TRUE, FALSE);
+ // raise error if saving failed
+ if (!$saved) {
+ raise_error(array('code' => 800, 'type' => 'imap',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Could not save message in $store_target"), TRUE, FALSE);
- if ($savedraft) {
- $OUTPUT->show_message('errorsaving', 'error');
- $OUTPUT->send('iframe');
- }
+ if ($savedraft) {
+ $OUTPUT->show_message('errorsaving', 'error');
+ // start the auto-save timer again
+ $OUTPUT->command('auto_save_start');
+ $OUTPUT->send('iframe');
}
}