mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-15 16:08:31 +01:00
use html::content_header for gathering download headers on attachments
This commit is contained in:
parent
a763dd6234
commit
9045eea7fc
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user