Changeset 4491 in subversion
- Timestamp:
- Feb 4, 2011 3:23:45 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_message.php
r4487 r4491 491 491 if ($mimetype == 'multipart/related' && sizeof($this->inline_parts)) { 492 492 $a_replaces = array(); 493 $img_regexp = '/^image\/(gif|jpe?g|png|tiff|bmp|svg)/'; 493 494 494 495 foreach ($this->inline_parts as $inline_object) { … … 499 500 $a_replaces[$inline_object->content_location] = $part_url; 500 501 } 501 // MS Outlook sends sometimes non-related attachments as related 502 // In this case multipart/related message has only one text part503 // We'll add all such attachments to the attachments list504 if (!isset($got_html_part) && empty($inline_object->content_id)505 && !empty($inline_object->filename)506 ) {507 $this->attachments[] = $inline_object;508 }509 // MS Outlook sometimes also adds non-image attachments as related510 // We'll add all such attachments to the attachments list511 // Warning: some browsers support pdf in <img/>512 // @TODO: we should fetch HTML body and find attachment's content-id513 // to handle also image attachments without reference in the body514 if (!empty($inline_object->filename)515 && !preg_match('/^image\/(gif|jpe?g|png|tiff|bmp|svg)/', $inline_object->mimetype)516 ) {517 $this->attachments[] = $inline_object;502 503 if (!empty($inline_object->filename)) { 504 // MS Outlook sends sometimes non-related attachments as related 505 // In this case multipart/related message has only one text part 506 // We'll add all such attachments to the attachments list 507 if (!isset($got_html_part) && empty($inline_object->content_id)) { 508 $this->attachments[] = $inline_object; 509 } 510 // MS Outlook sometimes also adds non-image attachments as related 511 // We'll add all such attachments to the attachments list 512 // Warning: some browsers support pdf in <img/> 513 else if (!preg_match($img_regexp, $inline_object->mimetype)) { 514 $this->attachments[] = $inline_object; 515 } 516 // @TODO: we should fetch HTML body and find attachment's content-id 517 // to handle also image attachments without reference in the body 518 // @TODO: should we list all image attachments in text mode? 518 519 } 519 520 }
Note: See TracChangeset
for help on using the changeset viewer.
