X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=img_auth.php;h=6f6152eb1332c8c8801e10d129af560239a0c0ce;hb=90da6ca44cc5693fb1d040793463d9a94dd29ef5;hp=875eb3277b40940bd8b8a52bc72a6aaffc8f0fa8;hpb=b090ca3fd5a72b087f7cb2be44b7ef3c09913c64;p=lhc%2Fweb%2Fwiklou.git diff --git a/img_auth.php b/img_auth.php index 875eb3277b..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,142 +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 = <<