Make WordPress Core


Ignore:
Timestamp:
08/03/2012 05:51:42 PM (12 years ago)
Author:
ryan
Message:

Deprecate get_blog_option(), add_blog_option(), update_blog_option(), and delete_blog_option().

Use the regular option functions wrapped in switch_to_blog() and restore_current_blog() instead.

Group multiple operations within a single switch where possible.

fixes #21432

File:
1 edited

Legend:

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

    r19569 r21414  
    6161        echo "<ul>";
    6262        foreach ( (array) $blogs as $details ) {
    63             $siteurl = get_blog_option( $details['blog_id'], 'siteurl' );
     63            switch_to_blog( $details['blog_id'] );
     64            $siteurl = site_url();
     65            $upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' );
     66            restore_current_blog();
    6467            echo "<li>$siteurl</li>";
    65             $response = wp_remote_get( trailingslashit( $siteurl ) . "wp-admin/upgrade.php?step=upgrade_db", array( 'timeout' => 120, 'httpversion' => '1.1' ) );
     68            $response = wp_remote_get( $upgrade_url, array( 'timeout' => 120, 'httpversion' => '1.1' ) );
    6669            if ( is_wp_error( $response ) )
    6770                wp_die( sprintf( __( 'Warning! Problem updating %1$s. Your server may not be able to connect to sites running on it. Error message: <em>%2$s</em>' ), $siteurl, $response->get_error_message() ) );
Note: See TracChangeset for help on using the changeset viewer.