Another workaround for an extra newline inside a form.
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 1 Feb 2001 00:01:52 +0000 (00:01 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 1 Feb 2001 00:01:52 +0000 (00:01 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1021 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index 33e7d0fc0c9c37a1ab5554ca2af99367b25dcc8b..12b72be23a48c1b63b80851a0334729d5013b303 100644 (file)
@@ -40,6 +40,9 @@
 
    include("../src/load_prefs.php");
 
 
    include("../src/load_prefs.php");
 
+   if (!isset($attachments))
+       $attachments = array();
+
    // This function is used when not sending or adding attachments
    function newMail () {
       global $forward_id, $imapConnection, $msg, $ent_num, $body_ary, $body,
    // This function is used when not sending or adding attachments
    function newMail () {
       global $forward_id, $imapConnection, $msg, $ent_num, $body_ary, $body,
       echo "     <TD BGCOLOR=\"$color[0]\" VALIGN=TOP ALIGN=RIGHT>\n";
       echo "      <SMALL><BR></SMALL>"._("Attach:");
       echo "      </td><td ALIGN=left BGCOLOR=\"$color[0]\">\n";
       echo "     <TD BGCOLOR=\"$color[0]\" VALIGN=TOP ALIGN=RIGHT>\n";
       echo "      <SMALL><BR></SMALL>"._("Attach:");
       echo "      </td><td ALIGN=left BGCOLOR=\"$color[0]\">\n";
-      //      echo "      <INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\"\n";
-      //      echo "      value=\"10000\">\n";
       echo "      <INPUT NAME=\"attachfile\" SIZE=48 TYPE=\"file\">\n";
       echo "      &nbsp;&nbsp;<input type=\"submit\" name=\"attach\"";
       echo " value=\"" . _("Add") ."\">\n";
       echo "      <INPUT NAME=\"attachfile\" SIZE=48 TYPE=\"file\">\n";
       echo "      &nbsp;&nbsp;<input type=\"submit\" name=\"attach\"";
       echo " value=\"" . _("Add") ."\">\n";
           $HTTP_POST_FILES['attachfile']['tmp_name'] != 'none')
           $AttachFailure = saveAttachedFiles();
       if (checkInput(false) && ! isset($AttachFailure)) {
           $HTTP_POST_FILES['attachfile']['tmp_name'] != 'none')
           $AttachFailure = saveAttachedFiles();
       if (checkInput(false) && ! isset($AttachFailure)) {
+         $mailbox = ereg_replace("([\n|\r])", '', $mailbox);
          $urlMailbox = urlencode ($mailbox);
         if (! isset($reply_id))
             $reply_id = 0;
          $urlMailbox = urlencode ($mailbox);
         if (! isset($reply_id))
             $reply_id = 0;
       sqimap_logout($imapConnection);
    }
 ?>
       sqimap_logout($imapConnection);
    }
 ?>
-