Replaced code with call to function with same purpose. Also, the code didn't
authorindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 15 Aug 2002 19:48:17 +0000 (19:48 +0000)
committerindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 15 Aug 2002 19:48:17 +0000 (19:48 +0000)
work right anyway :)

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

functions/mime.php

index 6b6fd2a619c8892dfb0fe437bb7be7bbb705ee88..d4ac2e735dc1639724de9841082f4e1cec96fdca 100644 (file)
@@ -163,6 +163,10 @@ function mime_print_body_lines ($imap_stream, $id, $ent_id, $encoding) {
        $sid_s = $sid;
     }
 
+    $body = mime_fetch_body ($imap_stream, $id, $ent_id);
+    echo decodeBody($body, $encoding);
+    return;
+/*
     fputs ($imap_stream, "$sid FETCH $id BODY[$ent_id]\r\n");
     $cnt = 0;
     $continue = true;
@@ -172,22 +176,23 @@ function mime_print_body_lines ($imap_stream, $id, $ent_id, $encoding) {
     // This could be bad -- if the section has sqimap_session_id() . ' OK'
     // or similar, it will kill the download.
     while (!ereg("^".$sid_s." (OK|BAD|NO)(.*)$", $read, $regs)) {
-      if (trim($read) == ')==') {
-          $read1 = $read;
-          $read = fgets ($imap_stream,4096);
-          if (ereg("^".$sid." (OK|BAD|NO)(.*)$", $read, $regs)) {
-              return;
-          } else {
-              echo decodeBody($read1, $encoding) .
-                   decodeBody($read, $encoding);
-          }
-      } else if ($cnt) {
-          echo decodeBody($read, $encoding);
-      }
-      $read = fgets ($imap_stream,4096);
-      $cnt++;
+        if (trim($read) == ')==') {
+            $read1 = $read;
+            $read = fgets ($imap_stream,4096);
+            if (ereg("^".$sid." (OK|BAD|NO)(.*)$", $read, $regs)) {
+                return;
+            } else {
+                echo decodeBody($read1, $encoding) .
+                     decodeBody($read, $encoding);
+            }
+        } else if ($cnt) {
+            echo decodeBody($read, $encoding);
+        }
+        $read = fgets ($imap_stream,4096);
+        $cnt++;
 //      break;
     }
+*/
 }
 
 /* -[ END MIME DECODING ]----------------------------------------------------------- */
@@ -1597,4 +1602,4 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX'){
     return $trusted;
 }
 
-?>
\ No newline at end of file
+?>