diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-10-09 11:39:17 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-10-09 11:39:17 +0000 |
| commit | 75e0ccc3a64e164d036da4f71f458520ddea3b24 (patch) | |
| tree | 94f00db692e25c95030f7984c27178e1bd7e1bcd /wp-content/blogs.php | |
| parent | ca036ad95fc44c318275ab539a52f1eb6fddf060 (diff) | |
| download | wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.tar.gz wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.tar.xz wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.zip | |
WP Merge - needs testing.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@797 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-content/blogs.php')
| -rw-r--r-- | wp-content/blogs.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/wp-content/blogs.php b/wp-content/blogs.php index 16cb742..cf01353 100644 --- a/wp-content/blogs.php +++ b/wp-content/blogs.php @@ -8,7 +8,7 @@ if ( $current_blog->deleted == '1'
) {
header("HTTP/1.1 404 Not Found");
- die('404 — File not found.');
+ graceful_fail('404 — File not found.');
}
if ( !function_exists('wp_check_filetype') ) :
@@ -68,19 +68,20 @@ function wp_check_filetype($filename, $mimes = null) { }
endif;
+
$file = $_GET[ 'file' ];
-$file = constant( "ABSPATH" ) . constant( "UPLOADS" ) . $file;
+$file = constant( "ABSPATH" ) . constant( "UPLOADS" ) . $file;
if ( !is_file( $file ) ) {
header("HTTP/1.1 404 Not Found");
- die('404 — File not found.');
+ graceful_fail('404 — File not found.');
}
// These should never, ever be served
$never = array( 'js', 'exe', 'swf', 'class', 'tar', 'zip', 'rar' );
if ( in_array( preg_replace( '|.*\.(.*)$|', '$1', $file ), $never ) ) {
header("HTTP/1.1 404 Not Found");
- die('404 — File not found.');
+ graceful_fail('404 — File not found.');
}
$mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] );
|
