Make WordPress Core

Ticket #38355: 38355.diff

File 38355.diff, 1.1 KB (added by dipesh.kakadiya, 9 years ago)
  • wp-includes/ms-functions.php

     
    5353        if ( false !== $primary_blog ) {
    5454                if ( ! isset( $blogs[ $primary_blog ] ) ) {
    5555                        update_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id );
    56                         $primary = get_blog_details( $first_blog->userblog_id );
     56                        $primary = get_site( $first_blog->userblog_id );
    5757                } else {
    58                         $primary = get_blog_details( $primary_blog );
     58                        $primary = get_site( $primary_blog );
    5959                }
    6060        } else {
    6161                //TODO Review this call to add_user_to_blog too - to get here the user must have a role on this blog?
     
    7171                        foreach ( (array) $blogs as $blog_id => $blog ) {
    7272                                if ( $blog->site_id != $wpdb->siteid )
    7373                                        continue;
    74                                 $details = get_blog_details( $blog_id );
     74                                $details = get_site( $blog_id );
    7575                                if ( is_object( $details ) && $details->archived == 0 && $details->spam == 0 && $details->deleted == 0 ) {
    7676                                        $ret = $blog;
    7777                                        if ( get_user_meta( $user_id , 'primary_blog', true ) != $blog_id )