Skip to content

Commit

Permalink
Short circuit if we have an attachment disposition.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Aug 6, 2015
1 parent a1e2c8a commit 42a3933
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -250,7 +250,6 @@ protected function _getParts()
$html_id = $this->_basePart->findBody('html');
}


// Deduce which part(s) we need to request.
$want_html_text = $this->_wantHtml();
$want_plain_text = $this->_wantPlainText($html_id, $want_html_text);
Expand Down
5 changes: 5 additions & 0 deletions framework/ActiveSync/lib/Horde/ActiveSync/Mime.php
Expand Up @@ -122,9 +122,14 @@ public function hasAttachments()
* @param string $mime_type The MIME type.
*
* @return boolean True if an attachment.
* @todo Pass a single mime part as parameter.
*/
public function isAttachment($id, $mime_type)
{
if ($this->_base->getPart($id)->getDisposition() == 'attachment') {
return true;
}

switch ($mime_type) {
case 'text/plain':
if (!($this->_base->findBody('plain') == $id)) {
Expand Down

0 comments on commit 42a3933

Please sign in to comment.