Make WordPress Core


Ignore:
Timestamp:
11/03/2010 01:34:04 PM (14 years ago)
Author:
ryan
Message:

Show latest x users with no paging if on a large network. see #15170

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-users-list-table.php

    r16128 r16160  
    3838            'blog_id' => 0
    3939        );
     40
     41        // If the network is large and a search is not being performed, show only the latest users with no paging in order
     42        // to avoid expensive count queries.
     43        if ( !$usersearch && ( get_blog_count() >= 10000 ) ) {
     44            if ( !isset($_REQUEST['orderby']) )
     45                $_GET['orderby'] = $_REQUEST['orderby'] = 'id';
     46            if ( !isset($_REQUEST['order']) )
     47                $_GET['order'] = $_REQUEST['order'] = 'DESC';
     48            $args['count_total'] = false;
     49        }
    4050
    4151        if ( isset( $_REQUEST['orderby'] ) )
Note: See TracChangeset for help on using the changeset viewer.