Ignore:
Timestamp:
10/18/10 13:48:42 (14 years ago)
Author:
rafaelraymundo
Message:

Ticket #1293 - Acerta encaminhamento de msgs com nome de anexo com caracteres especiais.

Location:
branches/2.2/expressoMail1_2/inc
Files:
2 edited

Legend:

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

    r3352 r3369  
    18091809                ## 
    18101810                # @AUTHOR Rodrigo Souza dos Santos 
    1811                 # @DATE 2008/09/17 
     1811                # @DATE 2008/09/17$fileName 
    18121812                # @BRIEF Checks if the user has permission to send an email with the email address used. 
    18131813                ## 
     
    18791879                $forwarding_attachments = $params['forwarding_attachments']; 
    18801880                $local_attachments = $params['local_attachments']; 
    1881                  
     1881 
    18821882                //Test if must be saved in shared folder and change if necessary 
    18831883                if( $fromaddress[2] == 'y' ){ 
     
    20742074                                        $fileName = $file_description[2]; 
    20752075                                        if(!array_search(trim($fileName),$name_cid_files)) { 
    2076                                                 $mail->AddStringAttachment($fileContent, $fileName, $file_description[4], $this->get_file_type($file_description[2])); 
     2076                                                $mail->AddStringAttachment($fileContent,html_entity_decode(rawurldecode($fileName)), $file_description[4], $this->get_file_type($file_description[2])); 
    20772077                                } 
    20782078                        } 
  • branches/2.2/expressoMail1_2/inc/gotodownload.php

    r3240 r3369  
    1212        $msg_number = $_GET['msg_number']; 
    1313        $idx_file = $_GET['idx_file']; 
    14         $newfilename = urldecode($_GET['newfilename']); 
     14        $newfilename = html_entity_decode(rawurldecode($_GET['newfilename'])); 
    1515        $msg_part = $_GET['msg_part']; 
    1616        $msg_folder = $_GET['msg_folder']; 
     
    2424                $password = $_SESSION['phpgw_info']['expressomail']['user']['passwd']; 
    2525                $imap_server = $_SESSION['phpgw_info']['expressomail']['email_server']['imapServer']; 
    26                 $imap_port      = $_SESSION['phpgw_info']['expressomail']['email_server']['imapPort'];           
     26                $imap_port      = $_SESSION['phpgw_info']['expressomail']['email_server']['imapPort']; 
    2727                if ($_SESSION['phpgw_info']['expressomail']['email_server']['imapTLSEncryption'] == 'yes') 
    2828                { 
     
    3333                        $imap_options = '/notls/novalidate-cert'; 
    3434                } 
    35                 $mbox_stream = imap_open("{".$imap_server.":".$imap_port.$imap_options."}".$msg_folder, $username, $password);           
     35                $mbox_stream = imap_open("{".$imap_server.":".$imap_port.$imap_options."}".$msg_folder, $username, $password); 
    3636                $fileContent = imap_fetchbody($mbox_stream, $msg_number, $msg_part, FT_UID); 
    3737                /* 
    3838                 *Removed by Bug #546 
    3939                 *include("class.imap_attachment.inc.php"); 
    40                  *$imap_attachment = new imap_attachment();                      
     40                 *$imap_attachment = new imap_attachment(); 
    4141                 *$a = $imap_attachment->download_attachment($mbox_stream, $msg_number); 
    4242                 *$filename = $a[$idx_file]['name']; 
     
    5454 
    5555        function downloadFile($strFileType, $strFileName, $newFileName, $fileContent, $encoding) { 
    56                 //avoid stuck request  
    57                 session_write_close();  
     56                //avoid stuck request 
     57                session_write_close(); 
    5858                $ContentType = "application/octet-stream"; 
    5959 
    60                 if ($strFileType == ".asf")  
     60                if ($strFileType == ".asf") 
    6161                        $ContentType = "video/x-ms-asf"; 
    6262                if ($strFileType == ".avi") 
     
    8282                if ($strFileType == ".htm" || $strFileType == "html") 
    8383                        $ContentType = "text/html"; 
    84                 if ($strFileType == ".xml")  
     84                if ($strFileType == ".xml") 
    8585                        $ContentType = "text/xml"; 
    86                 if ($strFileType == ".xsl")  
     86                if ($strFileType == ".xsl") 
    8787                        $ContentType = "text/xsl"; 
    88                 if ($strFileType == ".css")  
     88                if ($strFileType == ".css") 
    8989                        $ContentType = "text/css"; 
    90                 if ($strFileType == ".php")  
     90                if ($strFileType == ".php") 
    9191                        $ContentType = "text/php"; 
    92                 if ($strFileType == ".asp")  
     92                if ($strFileType == ".asp") 
    9393                        $ContentType = "text/asp"; 
    9494                if ($strFileType == ".pdf") 
     
    161161                header("Pragma: public"); 
    162162                header("Expires: 0"); // set expiration time 
    163                 header ("Content-Disposition: attachment; filename=\"". addslashes($newFileName)."\"");          
     163                header ("Content-Disposition: attachment; filename=\"". addslashes($newFileName)."\""); 
    164164                if($fileContent) { 
    165165                        if($encoding == 'base64') 
Note: See TracChangeset for help on using the changeset viewer.