X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmime.php;h=57ab298121fddc10171f21ccc5a026973688da7a;hb=78bc908d4b41bc0c707237e8449fce2dc22e54c6;hp=ac3b222a46837fca2436383b2899cfe0c447ab8a;hpb=ff9d4297a3132d46982095ded7975c2bf8d6694b;p=squirrelmail.git diff --git a/functions/mime.php b/functions/mime.php index ac3b222a..57ab2981 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,66 @@ 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; + /* removed urldecode because $_GET is auto urldecoded ??? */ + displayPageHeader( $color, $mailbox ); + echo "
\n\n" . + '' . htmlspecialchars($read) . ' |