Changeset 4869 for branches/2.3


Ignore:
Timestamp:
07/29/11 10:02:30 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #2157 - Mensagem assinada não abre no ExpressoMail?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/expressoMail1_2/inc/class.imap_functions.inc.php

    r4798 r4869  
    608608            $return['signature']        = $return_get_body['signature']; 
    609609                } 
    610                  
     610 
    611611                $flag = preg_match('/importance *: *(.*)\r/i', $header_, $importance); 
    612612                $return['Importance'] = ($flag == 0) ? "Normal" : $importance[1]; 
     
    921921                if(!$msg->structure[$msg_number]->parts) //Simple message, only 1 piece 
    922922                { 
    923                         if((strtolower($msg->structure[$msg_number]->subtype) == 'x-pkcs7-mime') && (count($return['signature']) == 0 ) ){ 
     923                        if((preg_match("/pkcs7-mime/i", $msg->structure[$msg_number]->subtype) == 1) && (count($return['signature']) == 0 ) ){ 
    924924                                $return['body']='isCripted'; 
    925925                                return $return; 
     
    928928                        $attachment = array(); //No attachments 
    929929 
    930                         if (strtolower($msg->structure[$msg_number]->subtype) == "x-pkcs7-mime") 
     930                        if (preg_match("/pkcs7-mime/i", $msg->structure[$msg_number]->subtype) == 1) 
    931931                        { 
    932932                                $return['body']='isSigned'; 
     
    40054005    } 
    40064006 
    4007     function show_decript($params){ 
     4007    function show_decript($params,$dec=0){ 
    40084008        $source = $params['source']; 
    4009         //error_log("source: $source\nversao: " . PHP_VERSION, 3, '/tmp/teste.log'); 
    4010         $source = str_replace(" ", "+", $source,$i); 
    4011  
    4012         if (version_compare(PHP_VERSION, '5.2.0', '>=')){ 
    4013             if(!$source = base64_decode($source,true)) 
    4014                 return "error ".$source."Espaços ".$i; 
    4015  
    4016         } 
    4017         else { 
    4018             if(!$source = base64_decode($source)) 
    4019                 return "error ".$source."Espaços ".$i; 
     4009        //error_log("source: $source\nversao: " . PHP_VERSION); 
     4010 
     4011        if ($dec == 0) 
     4012        { 
     4013            $source = str_replace(" ", "+", $source,$i); 
     4014            if (version_compare(PHP_VERSION, '5.2.0', '>=')){ 
     4015                if(!$source = base64_decode($source,true)) 
     4016                    return "error ".$source."Espaï¿œos ".$i; 
     4017 
     4018            } 
     4019            else { 
     4020                if(!$source = base64_decode($source)) 
     4021                    return "error ".$source."Espaï¿œos ".$i; 
     4022            } 
     4023 
    40204024        } 
    40214025 
Note: See TracChangeset for help on using the changeset viewer.