From: Michael M Slusarz Date: Wed, 7 Oct 2009 17:51:57 +0000 (-0600) Subject: For base (ID = 0) parts, any subpart is a body part X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=379bc8815bb5432509e27a7d0c8d3be11445f82b;p=horde.git For base (ID = 0) parts, any subpart is a body part --- diff --git a/framework/Mime/lib/Horde/Mime/Part.php b/framework/Mime/lib/Horde/Mime/Part.php index 8215bafad..596bab361 100644 --- a/framework/Mime/lib/Horde/Mime/Part.php +++ b/framework/Mime/lib/Horde/Mime/Part.php @@ -1450,9 +1450,11 @@ class Horde_Mime_Part */ public function findBody($subtype = null) { + $initial_id = $this->getMimeId(); + foreach ($this->contentTypeMap() as $mime_id => $mime_type) { if ((strpos($mime_type, 'text/') === 0) && - (intval($mime_id) == 1) && + (!$initial_id || (intval($mime_id) == 1)) && (is_null($subtype) || (substr($mime_type, 5) == $subtype))) { return $mime_id; }