- Timestamp:
- 10/03/2011 04:30:07 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-ms-sites-list-table.php
r18562 r18871 38 38 $like_s = esc_sql( like_escape( $s ) ); 39 39 40 $large_network = false;41 40 // If the network is large and a search is not being performed, show only the latest blogs with no paging in order 42 41 // to avoid expensive count queries. 43 if ( !$s && ( get_blog_count() >= 10000) ) {42 if ( !$s && wp_is_large_network() ) { 44 43 if ( !isset($_REQUEST['orderby']) ) 45 44 $_GET['orderby'] = $_REQUEST['orderby'] = ''; 46 45 if ( !isset($_REQUEST['order']) ) 47 46 $_GET['order'] = $_REQUEST['order'] = 'DESC'; 48 $large_network = true;49 47 } 50 48 … … 105 103 106 104 // Don't do an unbounded count on large networks 107 if ( ! $large_network)105 if ( ! wp_is_large_network() ) 108 106 $total = $wpdb->get_var( str_replace( 'SELECT *', 'SELECT COUNT( blog_id )', $query ) ); 109 107 … … 111 109 $this->items = $wpdb->get_results( $query, ARRAY_A ); 112 110 113 if ( $large_network)111 if ( wp_is_large_network() ) 114 112 $total = count($this->items); 115 113
Note: See TracChangeset
for help on using the changeset viewer.