Changeset 3369 for branches/2.2/expressoMail1_2/inc/gotodownload.php
- Timestamp:
- 10/18/10 13:48:42 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.