Make WordPress Core

Ticket #17376: 17376.4.diff

File 17376.4.diff, 855 bytes (added by nacin, 9 years ago)
  • src/wp-includes/ms-settings.php

     
    119119                $current_blog->blog_id = $blog_id = 1;
    120120        }
    121121
     122        if ( is_admin() && 0 !== strcasecmp( $current_blog->path, $path ) ) {
     123                unset( $current_blog );
     124        }
     125
    122126        // No site has been found, bail.
    123127        if ( empty( $current_blog ) ) {
    124128                // We're going to redirect to the network URL, with some possible modifications.
     
    149153                        if ( '%siteurl%' !== NOBLOGREDIRECT ) {
    150154                                $destination = NOBLOGREDIRECT;
    151155                        }
     156                } elseif ( is_admin() ) {
     157                        $destination .= 'wp-admin/';
    152158                } elseif ( 0 === strcasecmp( $current_site->domain, $domain ) ) {
    153159                        /*
    154160                         * If the domain we were searching for matches the network's domain,