Don't delete draft in dimp immediately after saving it.
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 26 Jun 2009 16:59:22 +0000 (10:59 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 26 Jun 2009 17:20:04 +0000 (11:20 -0600)
imp/compose-dimp.php

index 6bd8d46..d779c68 100644 (file)
@@ -97,11 +97,13 @@ if (count($_POST)) {
 
         /* Save the draft. */
         try {
+            $old_index = $imp_compose->getMetadata('draft_index');
+
             $res = $imp_compose->saveDraft($header, Horde_Util::getFormData('message', ''), NLS::getCharset(), Horde_Util::getFormData('html'));
             $result->success = 1;
 
             /* Delete existing draft. */
-            _removeAutoSaveDraft($imp_compose->getMetadata('draft_index'));
+            _removeAutoSaveDraft($old_index);
 
             if ($action != 'auto_save_draft') {
                 $notification->push($res);