WordPress.org

Make WordPress Core

Changeset 12808


Ignore:
Timestamp:
01/23/2010 12:33:10 AM (10 years ago)
Author:
wpmuguru
Message:

Fix table prefix on upgrade for 3.0 main site, Fixes #11970

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/ms-upgrade-site.php

    r12805 r12808  
    3434            foreach ( (array) $blogs as $details ) {
    3535                if ( $details['spam'] == 0 && $details['deleted'] == 0 && $details['archived'] == 0 ) {
    36                     $siteurl = $wpdb->get_var("SELECT option_value from {$wpdb->base_prefix}{$details['blog_id']}_options WHERE option_name = 'siteurl'");
     36                    $blog_prefix = $wpdb->get_blog_prefix( $details[ 'blog_id' ] );
     37                    $siteurl = $wpdb->get_var( "SELECT option_value from {$blog_prefix}options WHERE option_name = 'siteurl'" );
    3738                    echo "<li>$siteurl</li>";
    3839                    $response = wp_remote_get( trailingslashit( $siteurl ) . "wp-admin/upgrade.php?step=1", array( 'timeout' => 120, 'httpversion' => '1.1' ) );
Note: See TracChangeset for help on using the changeset viewer.