Skip to content
Snippets Groups Projects
Commit ab37cac9 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #761 from greezybacon/issue/inline-email-body


Fix parsing of attachments

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 2006ee19 b5f7bdff
No related branches found
No related tags found
No related merge requests found
...@@ -201,9 +201,6 @@ class Mail_Parse { ...@@ -201,9 +201,6 @@ class Mail_Parse {
function getAttachments($part=null){ function getAttachments($part=null){
if($part==null)
$part=$this->getStruct();
/* Consider this part as an attachment if /* Consider this part as an attachment if
* * It has a Content-Disposition header * * It has a Content-Disposition header
* * AND it is specified as either 'attachment' or 'inline' * * AND it is specified as either 'attachment' or 'inline'
...@@ -254,6 +251,9 @@ class Mail_Parse { ...@@ -254,6 +251,9 @@ class Mail_Parse {
return array($file); return array($file);
} }
if($part==null)
$part=$this->getStruct();
$files=array(); $files=array();
if($part->parts){ if($part->parts){
foreach($part->parts as $k=>$p){ foreach($part->parts as $k=>$p){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment