Skip to content

Commit

Permalink
Simplify, get mime id from the mime object.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed May 5, 2015
1 parent 4eda3dd commit d6ef196
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -260,7 +260,6 @@ protected function _getParts()
$this->_bodyPart = $this->_getBodyPart(
$data,
!empty($html_id) ? $html_body_part : $text_body_part,
!empty($html_id) ? $html_id : $text_id,
empty($html_id)
);
}
Expand Down Expand Up @@ -483,8 +482,6 @@ protected function _getHtmlPart(
*
* @param Horde_Imap_Client_Data_Fetch $data The FETCH results.
* @param Horde_Mime_Part $mime The plaintext MIME part.
* @param string $id The MIME id for this part on the IMAP
* server.
* @param boolean $to_html If true, $id is assumed to be a text/plain
* part and is converted to html.
*
Expand All @@ -495,8 +492,9 @@ protected function _getHtmlPart(
* - size: (integer) The original part size, in bytes.
*/
protected function _getBodyPart(
Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $mime, $id, $to_html)
Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $mime, $to_html)
{
$id = $mime->getMimeId();
$text = $data->getBodyPart($id);
if (!$data->getBodyPartDecode($id)) {
$mime->setContents($text);
Expand Down

0 comments on commit d6ef196

Please sign in to comment.