Ticket #37823: 37823.3.diff
File 37823.3.diff, 1.5 KB (added by , 4 years ago) |
---|
-
src/wp-admin/network/upgrade.php
55 55 update_site_option( 'wpmu_upgrade_site', $wp_db_version ); 56 56 } 57 57 58 $blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY blog_id DESC LIMIT {$n}, 5", ARRAY_A ); 58 $args = array( 59 'spam' => '0', 60 'deleted' => '0', 61 'archived' => '0', 62 'network_id' => get_current_network_id(), 63 'number' => $n, 64 'fields' => 'ids', 65 'order' => 'DESC', 66 'orderby' => 'id', 67 ); 68 $blogs = get_sites( $args ); 59 69 if ( empty( $blogs ) ) { 60 70 echo '<p>' . __( 'All done!' ) . '</p>'; 61 71 break; 62 72 } 63 73 echo "<ul>"; 64 foreach ( (array) $blogs as $ details) {65 switch_to_blog( $ details['blog_id']);74 foreach ( (array) $blogs as $id ) { 75 switch_to_blog( $id ); 66 76 $siteurl = site_url(); 67 77 $upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' ); 68 78 restore_current_blog(); … … 98 108 * 99 109 * @param int $blog_id The Site ID. 100 110 */ 101 do_action( 'wpmu_upgrade_site', $ details[ 'blog_id' ]);111 do_action( 'wpmu_upgrade_site', $id ); 102 112 } 103 113 echo "</ul>"; 104 114 ?><p><?php _e( 'If your browser doesn’t start loading the next page automatically, click this link:' ); ?> <a class="button" href="upgrade.php?action=upgrade&n=<?php echo ($n + 5) ?>"><?php _e("Next Sites"); ?></a></p>