Code

Updated download function-
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Jan 2008 11:08:48 +0000 (11:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Jan 2008 11:08:48 +0000 (11:08 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8565 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/functions.inc

index 76702935f6a746d949935f836b7507fe56a742b6..801f6101dcaf2c26f048e5fff54297e6f6c808e8 100644 (file)
@@ -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();
 }