diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-11-15 16:11:13 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-11-15 16:11:13 +0000 |
commit | a58e68f1fc7ee42c416a3fbe72ec32742f28f586 (patch) | |
tree | 08c8ca45efd8305327b4c0f004f858a1fe9aabac /wp-content | |
parent | 4fb1d97228c850820d65e8825d118f6a72ffac04 (diff) | |
download | wordpress-mu-a58e68f1fc7ee42c416a3fbe72ec32742f28f586.tar.gz wordpress-mu-a58e68f1fc7ee42c416a3fbe72ec32742f28f586.tar.xz wordpress-mu-a58e68f1fc7ee42c416a3fbe72ec32742f28f586.zip |
Use wp_check_filetype() first, fixes #496
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1149 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-content')
-rw-r--r-- | wp-content/blogs.php | 9 |
1 files changed, 4 insertions, 5 deletions
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 {
|