From: Michael M Slusarz Date: Mon, 31 Aug 2009 18:19:17 +0000 (-0600) Subject: Fix parsing of multipart subparts X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d94072cfe6dd8424f48a209f8e25bdd658041bed;p=horde.git Fix parsing of multipart subparts --- diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index 49fc17577..1cab6e91e 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -1752,9 +1752,12 @@ class Horde_Mime_Part /** * Creates a structure object from the text of one part of a MIME message. * - * @param string $header The header text. - * @param string $body The body text. - * @param string $ctype The default content-type. + * @param string $header The header text. + * @param string $body The body text. + * @param string $ctype The default content-type. + * @param boolean $forcemime If true, the message data is assumed to be + * MIME data. If not, a MIME-Version header + * must exist to be parsed as a MIME message. * * @return array See Horde_Mime_Part::parseStructure(). */ @@ -1844,7 +1847,7 @@ class Horde_Mime_Part foreach ($b_find as $val) { $subpart = substr($body, $val['start'], $val['length']); list($hdr_pos, $eol) = self::_findHeader($subpart); - $part['parts'][] = self::_getStructure(substr($subpart, 0, $hdr_pos), substr($subpart, $hdr_pos + $eol), ($part['subtype'] == 'digest') ? 'message/rfc822' : 'text/plain'); + $part['parts'][] = self::_getStructure(substr($subpart, 0, $hdr_pos), substr($subpart, $hdr_pos + $eol), ($part['subtype'] == 'digest') ? 'message/rfc822' : 'text/plain', true); } } break;