X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmime.php;h=07cfe443d988e09c0e762165b743dc408ee58d3c;hb=7c0ec1d81108c90f37fdab4b85520a05107fc58d;hp=83b21bfea0ac34981897ca12be88e1084fc4687d;hpb=9de421689de8b2540b33cc6005e371307be4e30f;p=squirrelmail.git diff --git a/functions/mime.php b/functions/mime.php index 83b21bfe..07cfe443 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -3,88 +3,91 @@ /** * mime.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2004 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 * messages. * * $Id$ + * @package squirrelmail */ -require_once('../functions/imap.php'); -require_once('../functions/attachment_common.php'); +/** The typical includes... */ +require_once(SM_PATH . 'functions/imap.php'); +require_once(SM_PATH . 'functions/attachment_common.php'); -/* --------------------------------------------------------------------------------- */ -/* MIME DECODING */ -/* --------------------------------------------------------------------------------- */ +/* -------------------------------------------------------------------------- */ +/* MIME DECODING */ +/* -------------------------------------------------------------------------- */ -/* This function gets the structure of a message and stores it in the "message" class. +/** + * Get the MIME structure + * + * This function gets the structure of a message and stores it in the "message" class. * It will return this object for use with all relevant header information and * fully parsed into the standard "message" object format. */ - 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]; + $i = 0; + $msg = Message::parseStructure($read,$i); if (!is_object($msg)) { - include_once( '../functions/display_messages.php' ); - global $color, $mailbox; - displayPageHeader( $color, urldecode($mailbox) ); - echo "
\n\n" . - ''.$read.' |
' . htmlspecialchars($read) . ''; plain_error_message( $errormessage, $color ); - echo '