From 993932d920bbae3bcde26ae9f5921e1240cde89b Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 23 Jan 2008 11:08:48 +0000 Subject: [PATCH] Updated download function- git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8565 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 76702935f..801f6101d 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -2638,7 +2638,14 @@ function send_binary_content($data,$name,$type = "application/octet-stream") header("Pragma: no-cache"); header("Cache-Control: post-check=0, pre-check=0"); header("Content-type: ".$type.""); - header("Content-Disposition: attachment; filename=".$name); + + /* force download dialog */ + if (preg_match('/MSIE 5.5/', $HTTP_USER_AGENT) || preg_match('/MSIE 6.0/', $HTTP_USER_AGENT)) { + header('Content-Disposition: filename="'.$name.'"'); + } else { + header('Content-Disposition: attachment; filename="'.$name.'"'); + } + echo $data; exit(); } -- 2.30.2