From: stekkel Date: Mon, 4 Nov 2002 20:24:06 +0000 (+0000) Subject: minor changes to the bodystructure parser X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=22efa9fb6a97191c96778d3766367ee366878253 minor changes to the bodystructure parser git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4090 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mime.php b/functions/mime.php index dbd1bbd5..f68d3717 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -29,9 +29,8 @@ function mime_structure ($bodystructure, $flags=array()) { /* Isolate the body structure and remove beginning and end parenthesis. */ $read = trim(substr ($bodystructure, strpos(strtolower($bodystructure), 'bodystructure') + 13)); $read = trim(substr ($read, 0, -1)); - $msg =& new Message(); - $res = $msg->parseStructure($read); - $msg = $res[0]; + $i = 0; + $msg = Message::parseStructure($read,$i); if (!is_object($msg)) { include_once(SM_PATH . 'functions/display_messages.php'); global $color, $mailbox; @@ -84,6 +83,8 @@ function mime_structure ($bodystructure, $flags=array()) { return $msg; } + + /* This starts the parsing of a particular structure. It is called recursively, * so it can be passed different structures. It returns an object of type * $message.