From a58e68f1fc7ee42c416a3fbe72ec32742f28f586 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 15 Nov 2007 16:11:13 +0000 Subject: Use wp_check_filetype() first, fixes #496 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1149 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-content/blogs.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'wp-content') diff --git a/wp-content/blogs.php b/wp-content/blogs.php index 798c433..2366152 100644 --- a/wp-content/blogs.php +++ b/wp-content/blogs.php @@ -71,11 +71,10 @@ if ( !is_file( $file ) ) { die('404 — File not found.'); } -if( function_exists( 'mime_content_type' ) ) { - $mime[ 'type' ] = mime_content_type( $file ); -} else { - $mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] ); -} +$mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] ); +if( $mime[ 'type' ] === false && function_exists( 'mime_content_type' ) ) + $mime[ 'type' ] = mime_content_type( $file ); + if( $mime[ 'type' ] != false ) { $mimetype = $mime[ 'type' ]; } else { -- cgit