From: hickert Date: Wed, 23 Jan 2008 11:08:48 +0000 (+0000) Subject: Updated download function- X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=993932d920bbae3bcde26ae9f5921e1240cde89b;p=gosa.git Updated download function- git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8565 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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(); }