Rewrote system CRM_Utils_System::download to take optional disposition argument
authorMaggie <maggie.epps@gmail.com>
Tue, 29 Apr 2014 16:44:52 +0000 (12:44 -0400)
committerMaggie <maggie.epps@gmail.com>
Tue, 29 Apr 2014 18:52:28 +0000 (14:52 -0400)
CRM/Utils/System.php

index 3883d6a744f89acb3da02fb23987d70564508924..5e46870e43134febd0ab20eecded05d46457d82b 100644 (file)
@@ -711,7 +711,8 @@ class CRM_Utils_System {
 
   static function download($name, $mimeType, &$buffer,
     $ext = NULL,
-    $output = TRUE
+    $output = TRUE,
+    $disposition = 'attachment'
   ) {
     $now = gmdate('D, d M Y H:i:s') . ' GMT';
 
@@ -732,7 +733,7 @@ class CRM_Utils_System {
       header('Pragma: public');
     }
     else {
-      header("Content-Disposition: attachment; $fileString");
+      header("Content-Disposition: $disposition; $fileString");
       header('Pragma: no-cache');
     }