Fixed a problem with signatures getting added all the time when
authorgustavf <gustavf@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 Feb 2000 12:33:14 +0000 (12:33 +0000)
committergustavf <gustavf@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 21 Feb 2000 12:33:14 +0000 (12:33 +0000)
attaching files.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@231 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/smtp.php
src/compose.php

index 58f9db7..6c81019 100644 (file)
@@ -6,9 +6,6 @@
     **/
 
 
-   /* These next 2 functions are stub functions for implementations of 
-      attachments */
-
    // Returns true only if this message is multipart
    function isMultipart () {
       global $attachments;
index 6e73f0b..8f7044b 100644 (file)
    function showInputForm () {
       global $send_to, $send_to_cc, $reply_subj, $forward_subj, $body,
          $passed_body, $color, $use_signature, $signature, $editor_size,
-         $attachments, $subject;
+         $attachments, $subject, $newmail;
 
       echo "\n<FORM action=\"compose.php\" METHOD=POST\n";
       echo "ENCTYPE=\"multipart/form-data\">\n";
 
       echo "   <TR>\n";
       echo "      <TD BGCOLOR=\"$color[4]\" COLSPAN=2>\n";
-      if ($use_signature == true)
-         echo "         &nbsp;&nbsp;<TEXTAREA NAME=body ROWS=20 COLS=\"$editor_size\" WRAP=HARD>". $body . "\n\n".$signature."</TEXTAREA><BR>";
+      if ($use_signature == true && $newmail == true)
+         echo "         &nbsp;&nbsp;<TEXTAREA NAME=body ROWS=20 COLS=\"$editor_size\" WRAP=HARD>". $body . "\n\n-- \n".$signature."</TEXTAREA><BR>";
       else
          echo "         &nbsp;&nbsp;<TEXTAREA NAME=body ROWS=20 COLS=\"$editor_size\" WRAP=HARD>".$body."</TEXTAREA><BR>\n";
       echo "      </TD>\n";
 
       showInputForm();
    } else {
-      Newmail();
+      $newmail = true;
       showInputForm();
    }
 ?>