Changeset 5172 for trunk/expressoMail1_2/inc/class.attachment.inc.php
- Timestamp:
- 11/11/11 16:42:49 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.attachment.inc.php
r5134 r5172 363 363 364 364 //Attachments com nomes grandes são quebrados em varias partes VER RFC2231 365 if( !$name && isset($structure->disposition) && (strtolower($structure->disposition) === 'attachment' || strtolower($structure->ctype_primary) == 'image' ))365 if( !$name && isset($structure->disposition) && (strtolower($structure->disposition) === 'attachment' || strtolower($structure->ctype_primary) == 'image' || strtolower($structure->ctype_primary.'/'.$structure->ctype_secondary) == 'application/octet-stream')) 366 366 foreach ($structure->d_parameters as $i => $v) 367 367 if(strpos($i , 'filename') !== false) 368 368 $name .= urldecode(str_ireplace(array('ISO-8859-1','UTF-8','US-ASCII'),'',$v)); 369 if( !$name && isset($structure->disposition) && (strtolower($structure->disposition) === 'attachment' || strtolower($structure->ctype_primary) == 'image' ) )369 if( !$name && isset($structure->disposition) && (strtolower($structure->disposition) === 'attachment' || strtolower($structure->ctype_primary) == 'image' || strtolower($structure->ctype_primary.'/'.$structure->ctype_secondary) == 'application/octet-stream') ) 370 370 foreach ($structure->ctype_parameters as $i => $v) 371 371 if(strpos($i , 'name') !== false) … … 439 439 $name = $part->ctype_parameters['name']; 440 440 441 //Attachments com nomes grandes são quebrados em varias partes VER RFC2231 442 if( !$name && isset($part->disposition) && (strtolower($part->disposition) === 'attachment' || strtolower($part->ctype_primary) == 'image' || strtolower($part->ctype_primary.'/'.$part->ctype_secondary) == 'application/octet-stream') ) 443 foreach ($part->d_parameters as $i => $v) 444 if(strpos($i , 'filename') !== false) 445 $name .= urldecode(str_ireplace(array('ISO-8859-1','UTF-8','US-ASCII'),'',$v)); 446 if( !$name && isset($part->disposition) && (strtolower($part->disposition) === 'attachment' || strtolower($part->ctype_primary) == 'image' || strtolower($part->ctype_primary.'/'.$part->ctype_secondary) == 'application/octet-stream') ) 447 foreach ($part->ctype_parameters as $i => $v) 448 if(strpos($i , 'name') !== false) 449 $name .= urldecode(str_ireplace(array('ISO-8859-1','UTF-8','US-ASCII'),'',$v)); 450 //////////////////////////////////////////////////////////////////////////////////// 451 441 452 if($name && (strlen($name) - (strrpos($name, '.')+1) === 3 )) 442 453 $ext = strtolower(substr ( $name , (strrpos($name, '.')+1) ));
Note: See TracChangeset
for help on using the changeset viewer.