X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fmime.php;h=4e2ac6c5407b1bd3a2e134a48ae8100de769bc8b;hp=7704e9303f3b061005edc705c4560ed5f0e2572c;hb=cef054e43ed3267ec7c3f9915271747b43992b0c;hpb=10dec454f7aeb0be71c75094c3b0c6990d8b1c5e diff --git a/functions/mime.php b/functions/mime.php index 7704e930..4e2ac6c5 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -3,7 +3,7 @@ /** * mime.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2003 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 @@ -12,8 +12,8 @@ * $Id$ */ -require_once('../functions/imap.php'); -require_once('../functions/attachment_common.php'); +require_once(SM_PATH . 'functions/imap.php'); +require_once(SM_PATH . 'functions/attachment_common.php'); /* --------------------------------------------------------------------------------- */ /* MIME DECODING */ @@ -26,52 +26,65 @@ require_once('../functions/attachment_common.php'); function mime_structure ($bodystructure, $flags=array()) { - // isolate the body structure and remove beginning and end parenthesis + /* Isolate the body structure and remove beginning and end parenthesis. */ $read = trim(substr ($bodystructure, strpos(strtolower($bodystructure), 'bodystructure') + 13)); - $msg = &new message(); $read = trim(substr ($read, 0, -1)); - $res = $msg->parseStructure($read); - $msg = $res[0]; - $msg->setEnt('0'); + $i = 0; + $msg = Message::parseStructure($read,$i); + if (!is_object($msg)) { + include_once(SM_PATH . 'functions/display_messages.php'); + global $color, $mailbox; + displayPageHeader( $color, urldecode($mailbox) ); + echo "
\n\n" . + '' . htmlspecialchars($read) . ' |