Make WordPress Core

Ticket #40695: d.diff

File d.diff, 904 bytes (added by andy, 8 years ago)
  • wp-includes/ms-functions.php

     
    13931393
    13941394        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    13951395
    1396         $suppress = $wpdb->suppress_errors();
    1397         if ( $wpdb->get_results( "DESCRIBE {$wpdb->posts}" ) )
     1396        if ( $wpdb->get_results( "SHOW TABLES LIKE '{$wpdb->posts}'" ) ) {
    13981397                die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p></body></html>' );
    1399         $wpdb->suppress_errors( $suppress );
     1398        }
    14001399
    1401         $url = get_blogaddress_by_id( $blog_id );
     1400        $site = get_site( (int) $blog_id );
     1401        $url = esc_url( 'http://' . $site->domain . $site->path );
    14021402
    14031403        // Set everything up
    14041404        make_db_current_silent( 'blog' );