[Svn] r6122 - trunk/roundcubemail/program/steps/mail

trac at roundcube.net trac at roundcube.net
Tue Apr 24 12:08:16 CEST 2012


Author: alec
Date: 2012-04-24 05:08:16 -0500 (Tue, 24 Apr 2012)
New Revision: 6122

Modified:
   trunk/roundcubemail/program/steps/mail/sendmail.inc
Log:
- Fix handling errors on draft auto-save


Modified: trunk/roundcubemail/program/steps/mail/sendmail.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/sendmail.inc	2012-04-24 06:40:56 UTC (rev 6121)
+++ trunk/roundcubemail/program/steps/mail/sendmail.inc	2012-04-24 10:08:16 UTC (rev 6122)
@@ -698,17 +698,19 @@
       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');
     }
   }
 



More information about the svn mailing list