X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=img_auth.php;h=6f6152eb1332c8c8801e10d129af560239a0c0ce;hb=5c173d9c4afa361439d678e587ca099115eb4b07;hp=ac625d7754ea83721d98766b908d8b1bd7c5878a;hpb=773f135ab1c459973aa27b0eafc5ad35fee54a5c;p=lhc%2Fweb%2Fwiklou.git diff --git a/img_auth.php b/img_auth.php index ac625d7754..6f6152eb13 100644 --- a/img_auth.php +++ b/img_auth.php @@ -13,6 +13,7 @@ define( 'MEDIAWIKI', true ); require_once( 'includes/Defines.php' ); require_once( './LocalSettings.php' ); require_once( 'includes/Setup.php' ); +require_once( 'includes/StreamFile.php' ); if( !isset( $_SERVER['PATH_INFO'] ) ) { wfForbidden(); @@ -40,141 +41,7 @@ if( is_dir( $filename ) ) { } # Write file -$type = wfGetType( $filename ); -if ( $type ) { - header('Content-type: '.$type); -} else { - header('Content-type: application/x-wiki'); -} - -readfile( $filename ); - -function wfGetType( $filename ) { - # There's probably a better way to do this - $types = <<