From 5d9c6f73b65a0b78156836ce7d0751360b581e33 Mon Sep 17 00:00:00 2001 From: indiri69 Date: Thu, 15 Aug 2002 19:48:17 +0000 Subject: [PATCH] Replaced code with call to function with same purpose. Also, the code didn't 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 | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 6b6fd2a6..d4ac2e73 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -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 +?> -- 2.25.1