Changeset 6265


Ignore:
Timestamp:
05/22/12 14:45:02 (12 years ago)
Author:
cristiano
Message:

Ticket #2773 - Caracteres indevidos na identificação de nome de mensagens em anexo

Location:
trunk
Files:
3 edited

Legend:

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

    r6254 r6265  
    29982998                { 
    29992999                    $value = json_decode($value, true); 
    3000  
     3000                                     
    30013001                    switch ($value['type']) { 
    30023002                        case 'imapPart': 
     
    30143014                            break; 
    30153015                            case 'imapMSG': 
    3016                                 $sub =  $value['name'] ? $value['name'].'.eml' :'no title.eml'; 
    30173016                                $mbox_stream = $this->open_mbox($value['folder']); 
    30183017                                $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 
    3019                                 $mailService->addStringAttachment($rawmsg, $sub, 'message/rfc822', '7bit', 'attachment' ); 
     3018                                $mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' ); 
    30203019                                $message_size_total += mb_strlen($rawmsg); //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg. 
    30213020                                unset($rawmsg); 
     
    30273026                } 
    30283027            } 
    3029          
     3028             
    30303029            $message_size_total += strlen($params['body']);   /* Tamanho do corpo da mensagem. */         
    30313030 
  • trunk/expressoMail1_2/js/draw_api.js

    r6263 r6265  
    13291329                                iframeFix: true, 
    13301330                                delay: 150, 
    1331                                 cursorAt: { top: 5, left: 56}, 
     1331                                cursorAt: {top: 5, left: 56}, 
    13321332                                refreshPositions: true, 
    13331333                                containment: "#divAppbox" 
     
    15821582                                var spanSender = document.createElement("SPAN"); 
    15831583                                spanSender.setAttribute('class','span-sender'); 
    1584                                 spanSender.onmouseover = function (event) {/*this.style.textDecoration = "underline";*/ try {InfoContact.begin(this,headers_msgs.reply_toaddress)} catch(e){};}; 
    1585                                 spanSender.onmouseout = function (){try {/*this.style.textDecoration = "none";*/ clearTimeout(InfoContact.timeout);} catch(e){}}; 
     1584                                spanSender.onmouseover = function (event) {/*this.style.textDecoration = "underline";*/try {InfoContact.begin(this,headers_msgs.reply_toaddress)} catch(e){};}; 
     1585                                spanSender.onmouseout = function (){try {/*this.style.textDecoration = "none";*/clearTimeout(InfoContact.timeout);} catch(e){}}; 
    15861586                                folder = special_folders['Sent']; 
    15871587                                current = get_current_folder(); 
     
    30233023                                                        delegatedFrom: '0', 
    30243024                                                        status: '4' 
    3025                                                 }, !!user.id ? {id : DataLayer.put('participant', {user: user.id, isExternal: user.isExternal}) } : {id: DataLayer.put('participant', {user: user})});  
     3025                                                }, !!user.id ? {id : DataLayer.put('participant', {user: user.id, isExternal: user.isExternal})} : {id: DataLayer.put('participant', {user: user})});  
    30263026                                 
    30273027                                        })       
     
    37953795                        modal: true, 
    37963796                        closeOnEscape:true, 
    3797                         close:function(event, ui) {event.stopPropagation(); }, 
     3797                        close:function(event, ui) {event.stopPropagation();}, 
    37983798                        autoOpen:false 
    37993799                }); 
     
    38113811                                                        att.uid = message_number; 
    38123812                                                        att.type = 'imapMSG'; 
    3813                                                         att.name = onceOpenedMessages[folder_name][message_number].subject + '.eml'; 
     3813                                                        att.name = Base64.encode(onceOpenedMessages[folder_name][message_number].subject + '.eml'); 
    38143814                                                        var idATT = JSON.stringify(att); 
    38153815                                                        addAttachment( ID , idATT);                         
    38163816                                                        var attach = {}; 
    3817                                                         attach.fileName = att.name 
     3817                                                        attach.fileName = onceOpenedMessages[folder_name][message_number].subject + '.eml'; 
    38183818                                                        if(attach.fileName.length > 45) 
    38193819                                                                        attach.fileName = attach.fileName.substr(0, 32) + " ... " + attach.fileName.substr(attach.fileName.length-9, attach.fileName.length); 
     
    42744274        var dn_em       = document.createElement("SPAN"); 
    42754275                dn_em.id = "tt_d"; 
    4276                 dn_em.onclick = function(){ block_user_email(email); /*filter.new_rule(email);*/ }; 
     4276                dn_em.onclick = function(){block_user_email(email); /*filter.new_rule(email);*/}; 
    42774277                dn_em.setAttribute("title",get_lang("Block Sender")); 
    42784278                dn_em.style.cursor = "pointer"; 
  • trunk/prototype/services/ImapServiceAdapter.php

    r6243 r6265  
    635635                                        { 
    636636                                                $value = json_decode($value, true); 
    637  
     637                                                 
    638638                                                switch ($value['type']) { 
    639639                                                        case 'imapPart': 
     
    649649                                                                break; 
    650650                                                        case 'imapMSG': 
    651                                                                 $sub =  $value['name'] ? $value['name'].'.eml' :'no title.eml'; 
    652651                                                                $mbox_stream = $this->open_mbox($value['folder']); 
    653652                                                                $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']); 
    654                                                                 $mailService->addStringAttachment($rawmsg, $sub, 'message/rfc822', '7bit', 'attachment' ); 
     653                                                                $mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' ); 
    655654                                                                unset($rawmsg); 
    656655                                                                break; 
Note: See TracChangeset for help on using the changeset viewer.