From 9045eea7fcde995365b75c674ea5def4c5eb3e8e Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 25 Feb 2014 15:31:57 +0000 Subject: [PATCH] use html::content_header for gathering download headers on attachments --- felamimail/inc/class.uidisplay.inc.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/felamimail/inc/class.uidisplay.inc.php b/felamimail/inc/class.uidisplay.inc.php index 04a8c88540..e010fd2bee 100644 --- a/felamimail/inc/class.uidisplay.inc.php +++ b/felamimail/inc/class.uidisplay.inc.php @@ -1427,19 +1427,7 @@ blockquote[type=cite] { //Import failed, download content anyway } } - header ("Content-Type: ".$attachment['type']."; name=\"". $attachment['filename'] ."\""); - if($_GET['mode'] == "save") { - // ask for download - header ("Content-Disposition: attachment; filename=\"". $attachment['filename'] ."\""); - } else { - // display it - header ("Content-Disposition: inline; filename=\"". $attachment['filename'] ."\""); - } - header("Expires: 0"); - // the next headers are for IE and SSL - header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); - header("Pragma: public"); - + html::content_header($attachment['filename'],$attachment['type'],0,True,($_GET['mode'] == "save")); echo $attachment['attachment']; $GLOBALS['egw']->common->egw_exit();