Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#15699 closed defect (bug) (fixed)

WP_Users_List_Table queries post counts in network admin

Reported by: westi Owned by:
Priority: normal Milestone: 3.1
Component: Network Admin Version: 3.1
Severity: normal Keywords: has-patch
Cc: scribu, PeteMall

Description (last modified by scribu)

When this table is displayed in the network admin for sites-users.php it calls count_many_users_posts in display_rows even when we are not going to display this info.

Attachments (1)

15699.diff (939 bytes) - added by scribu 2 years ago.
Avoind redundant call to count_many_users_posts()

Download all attachments as: .zip

Change History (8)

comment:1 follow-up: ↓ 4   westi2 years ago

Also is there a reason why the class attribute $site_id isn't called $blog_id because sites are different (One MS install can have many sites each with many blogs) so this is a confusing var name.

  • Description modified (diff)
  • Keywords has-patch added

scribu2 years ago

Avoind redundant call to count_many_users_posts()

comment:4 in reply to: ↑ 1   scribu2 years ago

Replying to westi:

Also is there a reason why the class attribute $site_id isn't called $blog_id because sites are different (One MS install can have many sites each with many blogs) so this is a confusing var name.

The network admin already broke the site/blog convention: /network/site-*.php

So, don't know which would be less confusing.

Files are fine. Code should be 'blog', never 'site'.

Actually, that means we should probably have WP_Blogs_List_Table, rather than WP_MS_Sites_List_Table. Surprised I didn't notice that before.

  • Resolution set to fixed
  • Status changed from new to closed

(In [16775]) Don't check post counts in the network admin. props scribu, fixes #15699.

(In [16794]) Fix logic inversion. see #15699.

Note: See TracTickets for help on using tickets.