Make WordPress Core


Ignore:
Timestamp:
01/22/2010 10:38:43 PM (15 years ago)
Author:
ryan
Message:

Fix warnings. see #11644

File:
1 edited

Legend:

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

    r12781 r12805  
    1717screen_icon();
    1818echo '<h2>'.__('Upgrade Site').'</h2>';
    19 switch( $_GET['action'] ) {
     19
     20$action = isset($_GET['action']) ? $_GET['action'] : 'show';
     21
     22switch ( $action ) {
    2023    case "upgrade":
    2124        $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0;
     
    2932        if ( is_array( $blogs ) ) {
    3033            echo "<ul>";
    31             foreach( (array) $blogs as $details ) {
     34            foreach ( (array) $blogs as $details ) {
    3235                if ( $details['spam'] == 0 && $details['deleted'] == 0 && $details['archived'] == 0 ) {
    3336                    $siteurl = $wpdb->get_var("SELECT option_value from {$wpdb->base_prefix}{$details['blog_id']}_options WHERE option_name = 'siteurl'");
    3437                    echo "<li>$siteurl</li>";
    3538                    $response = wp_remote_get( trailingslashit( $siteurl ) . "wp-admin/upgrade.php?step=1", array( 'timeout' => 120, 'httpversion' => '1.1' ) );
    36                     if ( is_wp_error( $response ) ) {
     39                    if ( is_wp_error( $response ) )
    3740                        wp_die( "<strong>Warning!</strong> Problem upgrading {$siteurl}. Your server may not be able to connect to blogs running on it.<br /> Error message: <em>" . $response->get_error_message() ."</em>" );
    38                     }
    3941                    do_action( 'after_mu_upgrade', $response );
    4042                    do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
     
    5557        }
    5658    break;
     59    case 'show':
    5760    default:
    5861        ?><p><?php _e("You can upgrade all the blogs on your site through this page. It works by calling the upgrade script of each blog automatically. Hit the link below to upgrade."); ?></p>
Note: See TracChangeset for help on using the changeset viewer.