From 800443d2085c1c27906a4ccd167372b91ee45541 Mon Sep 17 00:00:00 2001 From: PeteMall Date: Tue, 14 Dec 2010 08:38:01 +0000 Subject: [PATCH] Ensure correct HTTP status code is returned. Props nacin, fixes #15799 git-svn-id: http://svn.automattic.com/wordpress/trunk@16906 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-load.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/wp-includes/ms-load.php b/wp-includes/ms-load.php index 69df3fd15..353cbe2fe 100644 --- a/wp-includes/ms-load.php +++ b/wp-includes/ms-load.php @@ -81,28 +81,24 @@ function ms_site_check() { return true; if ( '1' == $current_blog->deleted ) { - if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) { + if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) return WP_CONTENT_DIR . '/blog-deleted.php'; - } else { - header( 'HTTP/1.1 410 Gone' ); - wp_die( /*WP_I18N_USER_DELETED_BLOG*/'This user has elected to delete their account and the content is no longer available.'/*/WP_I18N_USER_DELETED_BLOG*/ ); - } + else + wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) ); } if ( '2' == $current_blog->deleted ) { if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) return WP_CONTENT_DIR . '/blog-inactive.php'; else - wp_die( sprintf( /*WP_I18N_BLOG_NOT_ACTIVATED*/'This site has not been activated yet. If you are having problems activating your site, please contact %1$s.'/*/WP_I18N_BLOG_NOT_ACTIVATED*/, str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) ); + wp_die( sprintf( __( 'This site has not been activated yet. If you are having problems activating your site, please contact %1$s.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) ); } if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) { - if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) { + if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) return WP_CONTENT_DIR . '/blog-suspended.php'; - } else { - header( 'HTTP/1.1 410 Gone' ); - wp_die( /*WP_I18N_ARCHIVED*/'This site has been archived or suspended.'/*/WP_I18N_ARCHIVED*/ ); - } + else + wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) ); } return true;