X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmime.php;h=19fa5a83adde004d75fe329cae722b3a0134b4b2;hb=710a8254ee65541ea794849eeebb59c65356e349;hp=650e8385858bb6ffd26ac65a4aaffa4035ed2a4b;hpb=23bcec6f5d6fa3c9dda7c4306fd1b43c683ed234;p=squirrelmail.git diff --git a/functions/mime.php b/functions/mime.php index 650e8385..19fa5a83 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -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,51 +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)); - $msg = $msg->parseStructure($read,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) . ' |