Make WordPress Core

Ticket #31224: 31224.diff

File 31224.diff, 1.7 KB (added by MikeHansenMe, 10 years ago)
  • src/wp-includes/ms-functions.php

     
    19181918 * @since MU
    19191919 */
    19201920function maybe_add_existing_user_to_blog() {
    1921         if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) )
     1921        if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) ) {
    19221922                return false;
     1923        }
    19231924
    19241925        $parts = explode( '/', $_SERVER[ 'REQUEST_URI' ] );
    19251926        $key = array_pop( $parts );
    19261927
    1927         if ( $key == '' )
     1928        if ( $key == '' ) {
    19281929                $key = array_pop( $parts );
     1930        }
    19291931
    19301932        $details = get_option( 'new_user_' . $key );
    1931         if ( !empty( $details ) )
     1933        if ( ! empty( $details ) ) {
    19321934                delete_option( 'new_user_' . $key );
     1935        }
    19331936
    1934         if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) )
    1935                 wp_die( sprintf(__('An error occurred adding you to this site. Back to the <a href="%s">homepage</a>.'), home_url() ) );
     1937        if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) ) {
     1938                wp_die( sprintf( __( 'An error occurred adding you to this site. Back to the <a href="%s">homepage</a>.' ), home_url() ) );
     1939        }
    19361940
    1937         wp_die( sprintf( __( 'You have been added to this site. Please visit the <a href="%s">homepage</a> or <a href="%s">log in</a> using your username and password.' ), home_url(), admin_url() ), __( 'WordPress &rsaquo; Success' ) );
     1941        wp_die( sprintf( __( 'You have been added to this site. Please visit the <a href="%s">homepage</a> or <a href="%s">log in</a> using your username and password.' ), home_url(), admin_url() ), __( 'WordPress &rsaquo; Success' ), array( 'response' => 200 ) );
    19381942}
    19391943
    19401944/**