X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmime.php;h=bcd174090636b6b2fb5427085cec4e5f7b4bef7c;hb=84edf699d419494324e08176c89e9fbfc5a23818;hp=b957f986f7699b4c6602558427455c676b1348ae;hpb=a48eba8f9a66dfe0aca3b22ac14bbdbeaedf80bf;p=squirrelmail.git diff --git a/functions/mime.php b/functions/mime.php index b957f986..bcd17409 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -3,27 +3,53 @@ /** * mime.php * - * 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 * messages. * - * $Id$ + * @copyright 1999-2009 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package squirrelmail */ -require_once(SM_PATH . 'functions/imap.php'); -require_once(SM_PATH . 'functions/attachment_common.php'); +/** + * dependency information + functions dependency + mime_structure + class/mime/Message.class.php + Message::parseStructure + functions/page_header.php + displayPageHeader + functions/display_messages.php + plain_error_message + mime_fetch_body + functions/imap_general.php + sqimap_run_command + mime_print_body_lines + + + +functions/imap.php +functions/attachment_common.php +functions/display_messages.php + +magicHtml => url_parser +translateText => url_parser + +*/ -/* --------------------------------------------------------------------------------- */ -/* MIME DECODING */ -/* --------------------------------------------------------------------------------- */ -/* This function gets the structure of a message and stores it in the "message" class. +/* -------------------------------------------------------------------------- */ +/* MIME DECODING */ +/* -------------------------------------------------------------------------- */ + +/** + * 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. */ @@ -31,21 +57,20 @@ function mime_structure ($bodystructure, $flags=array()) { $read = trim(substr ($read, 0, -1)); $i = 0; $msg = Message::parseStructure($read,$i); + if (!is_object($msg)) { - include_once(SM_PATH . 'functions/display_messages.php'); global $color, $mailbox; displayPageHeader( $color, $mailbox ); - echo "
\n\n" . - '' . htmlspecialchars($read) . ' |
' . htmlspecialchars($read) . ''; + plain_error_message( $errormessage ); echo '