fix for bug #554886
authorjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 14 May 2002 04:20:41 +0000 (04:20 +0000)
committerjmunro <jmunro@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 14 May 2002 04:20:41 +0000 (04:20 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2819 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php
src/read_body.php

index c992a040013ada4005c3f6d15e8b2e254e7b08d0..e2c26708c7b7d05b291911ba3eb31bf11b69d2e2 100644 (file)
@@ -557,7 +557,7 @@ function showInputForm ($session) {
            $from_htmladdr_search, $location_of_buttons, $attachment_dir,
            $username, $data_dir, $identity, $draft_id, $delete_draft,
            $mailprio, $default_use_mdn, $mdn_user_support, $compose_new_win,
-           $saved_draft, $mail_sent, $sig_first;
+           $saved_draft, $mail_sent, $sig_first, $edit_as_new;
 
     $subject = decodeHeader($subject, false);
     $reply_subj = decodeHeader($reply_subj, false);
@@ -581,7 +581,7 @@ function showInputForm ($session) {
     
     echo ">\n";
 
-    if (isset($draft_id)) {
+    if (isset($draft_id) && !$edit_as_new) {
         echo '<input type="hidden" name="delete_draft" value="' . $draft_id . "\">\n";
     }
     if (isset($delete_draft)) {
index df3114793cdf30d3c7b115a8616d3fd39b712869..a784ab43bcea7aaa7db2dd82180e23d2c84eeb8e 100644 (file)
@@ -700,7 +700,7 @@ if (($mailbox == $draft_folder) && ($save_as_draft)) {
 }
 if ($mailbox == $sent_folder) {
     echo '|&nbsp;<A HREF="' . $base_uri .
-         "src/compose.php?mailbox=$mailbox&amp;identity=$identity&amp;send_to=$url_to_string&amp;send_to_cc=$url_cc_string&amp;send_to_bcc=$url_bcc_string&amp;subject=$url_subj&amp;mailprio=$priority_level&amp;ent_num=$ent_num" . '"';
+         "src/compose.php?mailbox=$mailbox&amp;identity=$identity&amp;send_to=$url_to_string&amp;send_to_cc=$url_cc_string&amp;send_to_bcc=$url_bcc_string&amp;subject=$url_subj&amp;mailprio=$priority_level&amp;draft_id=$passed_id&amp;edit_as_new=1&amp;ent_num=$ent_num" . '"';
     if ($compose_new_win == '1') {
         echo ' TARGET="compose_window" onClick="comp_in_new()"';
     }