diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2008-03-21 11:49:34 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2008-03-21 11:49:34 +0100 |
commit | 086ae52d12011746a75f5588e877347bc0457352 (patch) | |
tree | e73263c7a29d0f94fafb874562610e16eb292ba8 /includes/StreamFile.php | |
parent | 749e7fb2bae7bbda855de3c9e319435b9f698ff7 (diff) |
Update auf MediaWiki 1.12.0
Diffstat (limited to 'includes/StreamFile.php')
-rw-r--r-- | includes/StreamFile.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/StreamFile.php b/includes/StreamFile.php index 8ecaa4f0..2dbbe6de 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -2,7 +2,7 @@ /** */ /** */ -function wfStreamFile( $fname ) { +function wfStreamFile( $fname, $headers = array() ) { $stat = @stat( $fname ); if ( !$stat ) { header( 'HTTP/1.0 404 Not Found' ); @@ -34,6 +34,10 @@ function wfStreamFile( $fname ) { global $wgContLanguageCode; header( "Content-Disposition: inline;filename*=utf-8'$wgContLanguageCode'" . urlencode( basename( $fname ) ) ); + foreach ( $headers as $header ) { + header( $header ); + } + if ( !empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) { $modsince = preg_replace( '/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE'] ); $sinceTime = strtotime( $modsince ); |