Ticket #24922: 24922.diff
| File 24922.diff, 1.9 KB (added by , 11 years ago) |
|---|
-
wp-admin/network/upgrade.php
47 47 case "upgrade": 48 48 $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0; 49 49 50 if ( $n < 5 ) { 50 $n_sites = intval( apply_filters( 'ms_upgrade_sites', 5 ) ); 51 52 if ( $n < $n_sites ) { 51 53 /** 52 54 * @global string $wp_db_version 53 55 */ … … 55 57 update_site_option( 'wpmu_upgrade_site', $wp_db_version ); 56 58 } 57 59 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 registered DESC LIMIT {$n}, 5", ARRAY_A );60 $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 registered DESC LIMIT {$n}, {$n_sites}", ARRAY_A ); 59 61 if ( empty( $blogs ) ) { 60 62 echo '<p>' . __( 'All done!' ) . '</p>'; 61 63 break; … … 97 99 do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] ); 98 100 } 99 101 echo "</ul>"; 100 ?><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>102 ?><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 + $n_sites) ?>"><?php _e("Next Sites"); ?></a></p> 101 103 <script type="text/javascript"> 102 104 <!-- 103 105 function nextpage() { 104 location.href = "upgrade.php?action=upgrade&n=<?php echo ($n + 5) ?>";106 location.href = "upgrade.php?action=upgrade&n=<?php echo ($n + $n_sites) ?>"; 105 107 } 106 108 setTimeout( "nextpage()", 250 ); 107 109 //-->