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 33e7d0f..12b72be 100644 (file)
@@ -40,6 +40,9 @@
 
    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,
       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";
           $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;
       sqimap_logout($imapConnection);
    }
 ?>
-