Ignore:
Timestamp:
11/11/11 16:42:49 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2305 - Enviando alteracoes, desenvolvidas internamente na Prognus. Ultimas sincronizacoes...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.attachment.inc.php

    r5134 r5172  
    363363                  
    364364                            //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')) 
    366366                                        foreach ($structure->d_parameters as $i => $v) 
    367367                                                if(strpos($i , 'filename') !== false) 
    368368                                                        $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') ) 
    370370                                        foreach ($structure->ctype_parameters as $i => $v) 
    371371                                                if(strpos($i , 'name') !== false) 
     
    439439                         $name = $part->ctype_parameters['name']; 
    440440 
     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                     
    441452                    if($name && (strlen($name) - (strrpos($name, '.')+1) === 3 ))  
    442453                        $ext = strtolower(substr ( $name , (strrpos($name, '.')+1) ));           
Note: See TracChangeset for help on using the changeset viewer.