--- ezpublish-3.6.2/kernel/classes/binaryhandlers/ezfilepasstrough/ezfilepasstroughhandler.php 2005-09-19 09:26:57.000000000 +0100 +++ ez3/kernel/classes/binaryhandlers/ezfilepasstrough/ezfilepasstroughhandler.php 2005-10-06 15:37:48.000000000 +0100 @@ -76,6 +76,17 @@ } } + $fileDisposition = 'attachment'; + $fileINI =& eZINI::instance( 'file.ini' ); + if ( $fileINI->hasVariable( 'FileDisposition', 'MimeDisposition' ) ) + { + $dispostionTypes = $fileINI->variable( 'FileDisposition', 'MimeDisposition' ); + if ( $dispostionTypes && isset($dispostionTypes[$mimeType]) ) + { + $fileDisposition = $dispostionTypes[$mimeType]; + } + } + header( "Pragma: " ); header( "Cache-Control: " ); /* Set cache time out to 10 minutes, this should be good enough to work around an IE bug */ @@ -83,7 +94,7 @@ header( "Content-Length: $contentLength" ); header( "Content-Type: $mimeType" ); header( "X-Powered-By: eZ publish" ); - header( "Content-disposition: attachment; filename=\"$originalFileName\"" ); + header( "Content-disposition: $fileDisposition; filename=\"$originalFileName\"" ); header( "Content-Transfer-Encoding: binary" ); header( "Accept-Ranges: bytes" );