updated changelog, changed version number to 0.5pre2
[squirrelmail.git] / src / compose.php
index ccf4f7eb89b7d081815729e7934a5d747120f30d..a1e43f78b0b3eccf959d9ee767b98369b8ee3c71 100644 (file)
 
       /** This formats a CC string if they hit "reply all" **/
       if ($send_to_cc != "") {
+         $send_to_cc = ereg_replace( '"[^"]*"', "", $send_to_cc);
          $send_to_cc = ereg_replace(";", ",", $send_to_cc);
          $sendcc = explode(",", $send_to_cc);
          $send_to_cc = "";
       }
 
       echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
+      //echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
       if ($reply_id) {
          echo "<input type=hidden name=reply_id value=$reply_id>\n";
       }                 
 
       echo "</TABLE>\n";
       echo "</FORM>";
+      do_hook("compose_bottom");
    }
 
    function showSentForm () {
           error message, show=true **/
       global $body, $send_to, $subject, $color;
 
-      if ($body == "" && $subject == "") {
-         if ($show)
-            plain_error_message(_("You have not entered a message body or a subject."), $color);
-         return false;
-      } else if ($send_to == "") {
+      if ($send_to == "") {
          if ($show)
             plain_error_message(_("You have not filled in the \"To:\" field."), $color);
          return false;
       error_reporting(0); // Rename will produce error output if it fails
       if (!rename($attachfile, $attachment_dir.$localfilename)) {
          if (!copy($attachfile, $attachment_dir.$localfilename)) {
-            plain_error_message(_("Could not move/copy file. File not attached"));
+            plain_error_message(_("Could not move/copy file. File not attached"), $color);
             $failed = true;
          }
       }
       is_logged_in();
       displayPageHeader($color, $mailbox);
 
-      while (list($key, $localname) = each($delete)) {
-         array_splice ($attachments, $key, 1);
+      while (list($lkey, $localname) = each($delete)) {
+         array_splice ($attachments, $lkey, 1);
          unlink ($attachment_dir.$localname);
          unlink ($attachment_dir.$localname.".info");
       }