Don't check post counts in the network admin. props scribu, fixes #15699.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-12-07 20:54:04 +00:00
parent 057ed950e7
commit 944f37cd3e
1 changed files with 3 additions and 2 deletions

View File

@ -180,7 +180,8 @@ class WP_Users_List_Table extends WP_List_Table {
function display_rows() {
// Query the post counts for this page
$post_counts = count_many_users_posts( array_keys( $this->items ) );
if ( $this->is_site_users )
$post_counts = count_many_users_posts( array_keys( $this->items ) );
$style = '';
foreach ( $this->items as $userid => $user_object ) {
@ -190,7 +191,7 @@ class WP_Users_List_Table extends WP_List_Table {
continue;
$style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
echo "\n\t", $this->single_row( $user_object, $style, $role, $post_counts[ $userid ] );
echo "\n\t", $this->single_row( $user_object, $style, $role, isset( $post_counts ) ? $post_counts[ $userid ] : 0 );
}
}