X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmime.php;h=597c62f7e5bc77b55e04825a0fd55c2ac39ddf8f;hb=ef0feae60d3194845d04545a0fa9676dfdda8f34;hp=1390dcfc2cda074d7fb033dfc479bc935e3c46d0;hpb=6fbd125bd6a9b93f4426ded8ec23b4d6986c81bf;p=squirrelmail.git diff --git a/functions/mime.php b/functions/mime.php index 1390dcfc..597c62f7 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,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 =& new Message(); + $res = $msg->parseStructure($read); + $msg = $res[0]; + if (!is_object($msg)) { + include_once(SM_PATH . 'functions/display_messages.php'); + global $color, $mailbox; + displayPageHeader( $color, urldecode($mailbox) ); + echo "
\n\n" . + '' . htmlspecialchars($read) . ' |