r64779 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64778‎ | r64779 | r64780 >
Date:09:35, 9 April 2010
Author:jojo
Status:ok
Tags:
Comment:
set content-disposition header for older mwlib versions, too
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.body.php
@@ -1148,6 +1148,12 @@
11491149 header( 'Content-Length: ' . $content_length);
11501150 if ( $content_disposition ) {
11511151 header( 'Content-Disposition: ' . $content_disposition );
 1152+ } else {
 1153+ $ct_enc = split( ';', $content_type );
 1154+ $ct = $ct_enc[0];
 1155+ if ( isset( $wgCollectionContentTypeToFilename[$ct] ) ) {
 1156+ header( 'Content-Disposition: ' . 'inline; filename=' . $wgCollectionContentTypeToFilename[$ct] );
 1157+ }
11521158 }
11531159 fseek( $tempfile, 0 );
11541160 fpassthru( $tempfile );

Status & tagging log