Index: lib/filelib.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/filelib.php,v retrieving revision 1.30.2.3 diff -u -r1.30.2.3 filelib.php --- lib/filelib.php 6 Jan 2007 15:24:14 -0000 1.30.2.3 +++ lib/filelib.php 1 Feb 2007 13:42:42 -0000 @@ -223,6 +223,11 @@ function send_file($path, $filename, $lifetime=86400 , $filter=0, $pathisstring=false, $forcedownload=false, $mimetype='') { global $CFG; + // On IE, zip files get truncated when you try to read then inline + if ($mimetype == 'application/zip' or mimeinfo('type', $filename) == 'application/zip') { + $forcedownload = true; + } + // Use given MIME type if specified, otherwise guess it using mimeinfo. // IE, Konqueror and Opera open html file directly in browser from web even when directed to save it to disk :-O // only Firefox saves all files locally before opening when content-disposition: attachment stated