Browse Source

added a bunch of patches from the patch manager

Luke Ehresman 25 years ago
parent
commit
c880f37a6a
6 changed files with 14 additions and 12 deletions
  1. 6 0
      doc/README.russian_apache
  2. 1 0
      src/compose.php
  3. 2 0
      src/delete_message.php
  4. 3 5
      src/download.php
  5. 1 1
      src/read_body.php
  6. 1 6
      src/right_main.php

+ 6 - 0
doc/README.russian_apache

@@ -4,6 +4,12 @@ HOW TO CONFIGURE SQUIRREL-MAIL WITH RUSSIAN APACHE
 This text is available in Russian at 
 http://www.mricon.com/SM/russian_apache.html
 
+*****
+NOTE: Russian Apache will recode all attachments, even if they
+are binary, thus corrupting them. To fix this problem, refer to
+Russian Apache FAQ: http://apache.lexa.ru/faq.html#5
+*****
+ 
 This howto is for people who are using Russian Apache and
 who use charsets other than koi8-r for their source documents.
 If you _do_ use KOI8-R as default encoding for all your source

+ 1 - 0
src/compose.php

@@ -104,6 +104,7 @@
 
       /** 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 = "";

+ 2 - 0
src/delete_message.php

@@ -36,4 +36,6 @@
       header ("Location: $location/search.php?where=".urlencode($where)."&what=".urlencode($what)."&mailbox=".urlencode($mailbox));
    else   
       header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=".urlencode($mailbox));
+
+   sqimap_logout($imapConnection);
 ?>

+ 3 - 5
src/download.php

@@ -9,8 +9,6 @@
     **  Also allows displaying of attachments when possible.
     **/
 
-   session_start();
-
    if (!isset($config_php))
       include("../config/config.php");
    if (!isset($strings_php))
@@ -101,8 +99,8 @@
       switch($type0) {
          case "text":
             $body = decodeBody($body, $header->encoding);
-            header("Content-type: application/octet-stream; name=\"$filename\"");
             header("Content-Disposition: attachment; filename=\"$filename\"");
+            header("Content-type: application/octet-stream; name=\"$filename\"");
             if ($type1 == "plain") {
                echo _("Subject") . ": " . decodeHeader(stripslashes($top_header->subject)) . "\n";
                echo "   " . _("From") . ": " . decodeHeader(stripslashes($top_header->from)) . "\n";
@@ -113,8 +111,8 @@
             break;
          default:
             $body = decodeBody($body, $header->encoding);
-            header("Content-type: application/octet-stream; name=\"$filename\"");
             header("Content-Disposition: attachment; filename=\"$filename\"");
+            header("Content-type: application/octet-stream; name=\"$filename\"");
             echo $body;
             break;
       }
@@ -130,8 +128,8 @@
             break;
          default:
             $body = decodeBody($body, $header->encoding);
-            header("Content-type: $type0/$type1; name=\"$filename\"");
             header("Content-Disposition: attachment; filename=\"$filename\"");
+            header("Content-type: $type0/$type1; name=\"$filename\"");
             echo $body;
             break;
       }

+ 1 - 1
src/read_body.php

@@ -314,7 +314,7 @@
    echo "</TABLE>";
    echo "   </TD></TR>";
    echo "</table>";
-   echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=100% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
+   echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=97% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
 
    echo "   <TR><TD BGCOLOR=\"$color[4]\" WIDTH=100%>\n";
    $body = formatBody($imapConnection, $message, $color, $wrap_at);

+ 1 - 6
src/right_main.php

@@ -64,16 +64,11 @@
    include("../src/load_prefs.php");
 
    // If the page has been loaded without a specific mailbox,
-   //    just show a page of general info.
+   //   send them to the inbox
    if (!isset($mailbox)) {
       $mailbox = "INBOX";
       $sort = $newsort = 0;
       $startMessage = 1;
-
-//      displayPageHeader($color, "None");
-//      general_info($motd, $org_logo, $version, $org_name, $color);
-//      echo "</BODY></HTML>";
-//      exit;
    }
 
    sqimap_mailbox_select($imapConnection, $mailbox);