WordPress.org

Make WordPress Core

Ticket #16723: wp-network-upgrade.txt

File wp-network-upgrade.txt, 1.1 KB (added by mwillberg, 4 years ago)
Line 
1--- wordpress-3.1-fi\wordpress\wp-admin\network\upgrade.php     2011-02-24 08:06:36.000000000 +-0200
2+++ wp-admin\network\upgrade.php        2011-03-02 12:54:09.000000000 +-0200
3@@ -52,13 +52,15 @@
4                        echo '<p>' . __( 'All done!' ) . '</p>';
5                        break;
6                }
7                echo "<ul>";
8                foreach ( (array) $blogs as $details ) {
9                        $siteurl = get_blog_option( $details['blog_id'], 'siteurl' );
10-                       echo "<li>$siteurl</li>";
11+                       //Mig : Show some output for broken sites and send data to browser immediately
12+                       echo '<li>'.$details['blog_id'].",$siteurl</li>";
13+                       flush();
14                        $response = wp_remote_get( trailingslashit( $siteurl ) . "wp-admin/upgrade.php?step=upgrade_db", array( 'timeout' => 120, 'httpversion' => '1.1' ) );
15                        if ( is_wp_error( $response ) )
16                                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() ) );
17                        do_action( 'after_mu_upgrade', $response );
18                        do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
19                }