Changeset 3369 for branches/2.2/expressoMail1_2/inc
- Timestamp:
- 10/18/10 13:48:42 (14 years ago)
- 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 1809 1809 ## 1810 1810 # @AUTHOR Rodrigo Souza dos Santos 1811 # @DATE 2008/09/17 1811 # @DATE 2008/09/17$fileName 1812 1812 # @BRIEF Checks if the user has permission to send an email with the email address used. 1813 1813 ## … … 1879 1879 $forwarding_attachments = $params['forwarding_attachments']; 1880 1880 $local_attachments = $params['local_attachments']; 1881 1881 1882 1882 //Test if must be saved in shared folder and change if necessary 1883 1883 if( $fromaddress[2] == 'y' ){ … … 2074 2074 $fileName = $file_description[2]; 2075 2075 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])); 2077 2077 } 2078 2078 } -
branches/2.2/expressoMail1_2/inc/gotodownload.php
r3240 r3369 12 12 $msg_number = $_GET['msg_number']; 13 13 $idx_file = $_GET['idx_file']; 14 $newfilename = urldecode($_GET['newfilename']);14 $newfilename = html_entity_decode(rawurldecode($_GET['newfilename'])); 15 15 $msg_part = $_GET['msg_part']; 16 16 $msg_folder = $_GET['msg_folder']; … … 24 24 $password = $_SESSION['phpgw_info']['expressomail']['user']['passwd']; 25 25 $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']; 27 27 if ($_SESSION['phpgw_info']['expressomail']['email_server']['imapTLSEncryption'] == 'yes') 28 28 { … … 33 33 $imap_options = '/notls/novalidate-cert'; 34 34 } 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); 36 36 $fileContent = imap_fetchbody($mbox_stream, $msg_number, $msg_part, FT_UID); 37 37 /* 38 38 *Removed by Bug #546 39 39 *include("class.imap_attachment.inc.php"); 40 *$imap_attachment = new imap_attachment(); 40 *$imap_attachment = new imap_attachment(); 41 41 *$a = $imap_attachment->download_attachment($mbox_stream, $msg_number); 42 42 *$filename = $a[$idx_file]['name']; … … 54 54 55 55 function downloadFile($strFileType, $strFileName, $newFileName, $fileContent, $encoding) { 56 //avoid stuck request 57 session_write_close(); 56 //avoid stuck request 57 session_write_close(); 58 58 $ContentType = "application/octet-stream"; 59 59 60 if ($strFileType == ".asf") 60 if ($strFileType == ".asf") 61 61 $ContentType = "video/x-ms-asf"; 62 62 if ($strFileType == ".avi") … … 82 82 if ($strFileType == ".htm" || $strFileType == "html") 83 83 $ContentType = "text/html"; 84 if ($strFileType == ".xml") 84 if ($strFileType == ".xml") 85 85 $ContentType = "text/xml"; 86 if ($strFileType == ".xsl") 86 if ($strFileType == ".xsl") 87 87 $ContentType = "text/xsl"; 88 if ($strFileType == ".css") 88 if ($strFileType == ".css") 89 89 $ContentType = "text/css"; 90 if ($strFileType == ".php") 90 if ($strFileType == ".php") 91 91 $ContentType = "text/php"; 92 if ($strFileType == ".asp") 92 if ($strFileType == ".asp") 93 93 $ContentType = "text/asp"; 94 94 if ($strFileType == ".pdf") … … 161 161 header("Pragma: public"); 162 162 header("Expires: 0"); // set expiration time 163 header ("Content-Disposition: attachment; filename=\"". addslashes($newFileName)."\""); 163 header ("Content-Disposition: attachment; filename=\"". addslashes($newFileName)."\""); 164 164 if($fileContent) { 165 165 if($encoding == 'base64')
Note: See TracChangeset
for help on using the changeset viewer.