Fixing several small bugs...
[squirrelmail.git] / functions / mime.php
index e55e4cf21981dff5215bdfa517c1be13bfc034f0..9b65e9c9ab5431fd351cd8b499ec0541c0a0d1d9 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * mime.php
  *
- * Copyright (c) 1999-2001 The SquirrelMail Development Team
+ * Copyright (c) 1999-2002 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * This contains the functions necessary to detect and decode MIME
@@ -628,7 +628,7 @@ class msg_header {
       } else {
          $body = formatAttachments ($message, -1, $message->header->mailbox, $id);
       }
-      return( $body );
+      return ($body);
    }
 
    // A recursive function that returns a list of attachments with links
@@ -741,13 +741,9 @@ class msg_header {
          $body = quoted_printable_decode($body);
          
          
-         /*
-            Following code has been comented as I see no reason for it.
-            If there is any please tell me a mingo@rotedic.com
-            
          while (ereg("=\n", $body))
             $body = ereg_replace ("=\n", "", $body);
-        */
+           
       } else if ($encoding == 'base64') {
          $body = base64_decode($body);
       }
@@ -794,7 +790,7 @@ class msg_header {
 
      // Encode only if the string contains 8-bit characters or =?
      $j = strlen( $string  );
-     $l = FALSE;                             // Must be encoded ?
+     $l = strstr($string, '=?');         // Must be encoded ?
      $ret = '';
      for( $i=0; $i < $j; ++$i) {
         switch( $string{$i} ) {
@@ -802,7 +798,6 @@ class msg_header {
           $ret .= '=3D';
           break;
        case '?':
-          $l = TRUE;
           $ret .= '=3F';
           break;
        case '_':