Changeset 12805 for trunk/wp-admin/ms-upgrade-site.php
- Timestamp:
- 01/22/2010 10:38:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/ms-upgrade-site.php
r12781 r12805 17 17 screen_icon(); 18 18 echo '<h2>'.__('Upgrade Site').'</h2>'; 19 switch( $_GET['action'] ) { 19 20 $action = isset($_GET['action']) ? $_GET['action'] : 'show'; 21 22 switch ( $action ) { 20 23 case "upgrade": 21 24 $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0; … … 29 32 if ( is_array( $blogs ) ) { 30 33 echo "<ul>"; 31 foreach ( (array) $blogs as $details ) {34 foreach ( (array) $blogs as $details ) { 32 35 if ( $details['spam'] == 0 && $details['deleted'] == 0 && $details['archived'] == 0 ) { 33 36 $siteurl = $wpdb->get_var("SELECT option_value from {$wpdb->base_prefix}{$details['blog_id']}_options WHERE option_name = 'siteurl'"); 34 37 echo "<li>$siteurl</li>"; 35 38 $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 ) ) 37 40 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 }39 41 do_action( 'after_mu_upgrade', $response ); 40 42 do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] ); … … 55 57 } 56 58 break; 59 case 'show': 57 60 default: 58 61 ?><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.