From 09a4bde345934d6e8996dc6ae841d00cf848feef Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Fri, 8 Feb 2002 13:53:37 +0000 Subject: [PATCH] Code cleanup git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2383 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 5ce51925..6a4e9fe8 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -371,14 +371,19 @@ function mime_match_parenthesis ($pos, $structure) { } function mime_fetch_body ($imap_stream, $id, $ent_id ) { - // do a bit of error correction. If we couldn't find the entity id, just guess - // that it is the first one. That is usually the case anyway. - if (!$ent_id) + + /* + * do a bit of error correction. If we couldn't find the entity id, just guess + * that it is the first one. That is usually the case anyway. + */ + if (!$ent_id) { $ent_id = 1; + } $data = sqimap_run_command ($imap_stream, "FETCH $id BODY[$ent_id]", true, $response, $message); $topline = array_shift($data); - while (! ereg('\\* [0-9]+ FETCH ', $topline) && $data) + while (! ereg('\\* [0-9]+ FETCH ', $topline) && $data) { $topline = array_shift($data); + } $wholemessage = implode('', $data); if (ereg('\\{([^\\}]*)\\}', $topline, $regs)) { $ret = substr( $wholemessage, 0, $regs[1] ); @@ -431,14 +436,15 @@ function mime_fetch_body ($imap_stream, $id, $ent_id ) { "Submit message
" . '' . _("Response:") . "$response
" . _("Message:") . " $message
" . - _("FETCH line:") . " $topline
"; - + _("FETCH line:") . " $topline ....
"; + +/* $data = sqimap_run_command ($imap_stream, "FETCH $passed_id BODY[]", true, $response, $message); array_shift($data); $wholemessage = implode('', $data); $ret = "---------------\n$wholemessage"; - +*/ } return( $ret ); } -- 2.25.1