Skip to content

Commit

Permalink
Another place to simplify parameters. Already have the mime_id.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed May 5, 2015
1 parent 0c35b4d commit 9823f6d
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -247,7 +247,7 @@ protected function _getParts()
}

if (!empty($html_id) && $want_html_text) {
$results = $this->_getHtmlPart($data, $html_body_part, $html_id, $want_html_as_plain);
$results = $this->_getHtmlPart($data, $html_body_part, $want_html_as_plain);
$this->_html = !empty($results['html'])
? $results['html']
: null;
Expand Down Expand Up @@ -403,7 +403,6 @@ protected function _getPlainPart(
*
* @param Horde_Imap_Client_Data_Fetch $data FETCH results.
* @param Horde_Mime_Part $html_mime The text/html MIME part.
* @param string $html_id MIME id.
* @param boolean $convert_to_plain Convert text to plain text
* also? If true, will also return a 'plain' array.
*
Expand All @@ -412,7 +411,7 @@ protected function _getPlainPart(
* structure of each entry.
*/
protected function _getHtmlPart(
Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $html_mime, $html_id, $convert_to_plain)
Horde_Imap_Client_Data_Fetch $data, Horde_Mime_Part $html_mime, $convert_to_plain)
{
// @todo The length stuff in this method should really be done after
// we validate the text since it might change if there was an incorrect
Expand All @@ -422,6 +421,7 @@ protected function _getHtmlPart(
// charset MAY cause an email to be reported as truncated when it's not,
// causing an additional reload on the client when viewing.
$results = array();
$html_id = $html_mime->getMimeId();
$html = $data->getBodyPart($html_id);
if (!$data->getBodyPartDecode($html_id)) {
$html_mime->setContents($html);
Expand Down

0 comments on commit 9823f6d

Please sign in to comment.