Use upgrade_db instead of step=1 in ms-upgrade-network. Also, no need to check spam/deleted/archived as that is in the query. see #11869.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-15 21:36:38 +00:00
parent 1664674948
commit 64c5bb0a26
1 changed files with 7 additions and 9 deletions

View File

@ -43,15 +43,13 @@ switch ( $action ) {
} }
echo "<ul>"; echo "<ul>";
foreach ( (array) $blogs as $details ) { foreach ( (array) $blogs as $details ) {
if ( $details['spam'] == 0 && $details['deleted'] == 0 && $details['archived'] == 0 ) { $siteurl = get_blog_option( $details['blog_id'], 'siteurl' );
$siteurl = get_blog_option( $details['blog_id'], 'siteurl' ); echo "<li>$siteurl</li>";
echo "<li>$siteurl</li>"; $response = wp_remote_get( trailingslashit( $siteurl ) . "wp-admin/upgrade.php?step=upgrade_db", array( 'timeout' => 120, 'httpversion' => '1.1' ) );
$response = wp_remote_get( trailingslashit( $siteurl ) . "wp-admin/upgrade.php?step=1", array( 'timeout' => 120, 'httpversion' => '1.1' ) ); if ( is_wp_error( $response ) )
if ( is_wp_error( $response ) ) wp_die( "<strong>Warning!</strong> Problem updating {$siteurl}. Your server may not be able to connect to sites running on it.<br /> Error message: <em>" . $response->get_error_message() ."</em>" );
wp_die( "<strong>Warning!</strong> Problem updating {$siteurl}. Your server may not be able to connect to sites running on it.<br /> Error message: <em>" . $response->get_error_message() ."</em>" ); do_action( 'after_mu_upgrade', $response );
do_action( 'after_mu_upgrade', $response ); do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
}
} }
echo "</ul>"; echo "</ul>";
?><p><?php _e( 'If your browser doesn&#8217;t start loading the next page automatically, click this link:' ); ?> <a class="button" href="ms-upgrade-network.php?action=upgrade&amp;n=<?php echo ($n + 5) ?>"><?php _e("Next Sites"); ?></a></p> ?><p><?php _e( 'If your browser doesn&#8217;t start loading the next page automatically, click this link:' ); ?> <a class="button" href="ms-upgrade-network.php?action=upgrade&amp;n=<?php echo ($n + 5) ?>"><?php _e("Next Sites"); ?></a></p>