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
This commit is contained in:
parent
99337166eb
commit
800443d208
|
@ -81,28 +81,24 @@ function ms_site_check() {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ( '1' == $current_blog->deleted ) {
|
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';
|
return WP_CONTENT_DIR . '/blog-deleted.php';
|
||||||
} else {
|
else
|
||||||
header( 'HTTP/1.1 410 Gone' );
|
wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) );
|
||||||
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*/ );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( '2' == $current_blog->deleted ) {
|
if ( '2' == $current_blog->deleted ) {
|
||||||
if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) )
|
if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) )
|
||||||
return WP_CONTENT_DIR . '/blog-inactive.php';
|
return WP_CONTENT_DIR . '/blog-inactive.php';
|
||||||
else
|
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 <a href="mailto:%1$s">%1$s</a>.'/*/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 <a href="mailto:%1$s">%1$s</a>.' ), str_replace( '@', ' AT ', get_site_option( 'admin_email', "support@{$current_site->domain}" ) ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) {
|
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';
|
return WP_CONTENT_DIR . '/blog-suspended.php';
|
||||||
} else {
|
else
|
||||||
header( 'HTTP/1.1 410 Gone' );
|
wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) );
|
||||||
wp_die( /*WP_I18N_ARCHIVED*/'This site has been archived or suspended.'/*/WP_I18N_ARCHIVED*/ );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue