Merge branch 'm27_MDL-47404' of https://github.com/danmarsden/moodle into MOODLE_27_STABLE

This commit is contained in:
Sam Hemelryk
2014-09-29 14:23:31 +13:00
+4 -1
View File
@@ -2273,7 +2273,10 @@ function send_file($path, $filename, $lifetime = null , $filter=0, $pathisstring
if ($forcedownload) {
header('Content-Disposition: attachment; filename="'.$filename.'"');
} else {
} else if ($mimetype !== 'application/x-shockwave-flash') {
// If this is an swf don't pass content-disposition with filename as this makes the flash player treat the file
// as an upload and enforces security that may prevent the file from being loaded.
header('Content-Disposition: inline; filename="'.$filename.'"');
}