X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fmime.php;h=f253bab241bac10771c936d2f95e0ef16637e2ed;hb=b262c5208d07f9d191cc6cb1dc3cbe5b2da9c89b;hp=e7370aa7bc43bf42e5e6059403fab0a2b3713fc8;hpb=f792c641dae98980288cd24a6bbc9119ce214294;p=squirrelmail.git
diff --git a/functions/mime.php b/functions/mime.php
index e7370aa7..f253bab2 100644
--- a/functions/mime.php
+++ b/functions/mime.php
@@ -3,74 +3,113 @@
/**
* mime.php
*
- * Copyright (c) 1999-2002 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-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
*/
-require_once('../functions/imap.php');
-require_once('../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
-/* --------------------------------------------------------------------------------- */
-/* MIME DECODING */
-/* --------------------------------------------------------------------------------- */
+magicHtml => url_parser
+translateText => url_parser
-/* 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
+ /* 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);
- $msg->setEnt('0');
+ $i = 0;
+ $msg = Message::parseStructure($read,$i);
+
+ if (!is_object($msg)) {
+ global $color, $mailbox;
+ displayPageHeader( $color, $mailbox );
+ $errormessage = _("SquirrelMail could not decode the bodystructure of the message");
+ $errormessage .= '
'._("The bodystructure provided by your IMAP server:").'
';
+ $errormessage .= '
' . htmlspecialchars($read) . ''; + plain_error_message( $errormessage ); + echo '