WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/14/2010 08:38:01 AM (9 years ago)
Author:
PeteMall
Message:

Ensure correct HTTP status code is returned. Props nacin, fixes #15799

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-load.php

    r16785 r16906  
    8282
    8383    if ( '1' == $current_blog->deleted ) {
    84         if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) {
     84        if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
    8585            return WP_CONTENT_DIR . '/blog-deleted.php';
    86         } else {
    87             header( 'HTTP/1.1 410 Gone' );
    88             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*/ );
    89         }
     86        else
     87            wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) );
    9088    }
    9189
     
    9492            return WP_CONTENT_DIR . '/blog-inactive.php';
    9593        else
    96             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}" ) ) ) );
     94            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}" ) ) ) );
    9795    }
    9896
    9997    if ( $current_blog->archived == '1' || $current_blog->spam == '1' ) {
    100         if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) {
     98        if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) )
    10199            return WP_CONTENT_DIR . '/blog-suspended.php';
    102         } else {
    103             header( 'HTTP/1.1 410 Gone' );
    104             wp_die( /*WP_I18N_ARCHIVED*/'This site has been archived or suspended.'/*/WP_I18N_ARCHIVED*/ );
    105         }
     100        else
     101            wp_die( __( 'This site has been archived or suspended.' ), '', array( 'response' => 410 ) );
    106102    }
    107103
Note: See TracChangeset for help on using the changeset viewer.