Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#15699 closed defect (bug) (fixed)

WP_Users_List_Table queries post counts in network admin

Reported by: westi's profile westi Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Network Admin Keywords: has-patch
Focuses: multisite Cc:

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 14 years ago.
Avoind redundant call to count_many_users_posts()

Download all attachments as: .zip

Change History (8)

#1 follow-up: @westi
14 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.

#2 @scribu
14 years ago

  • Description modified (diff)

#3 @scribu
14 years ago

  • Keywords has-patch added

@scribu
14 years ago

Avoind redundant call to count_many_users_posts()

#4 in reply to: ↑ 1 @scribu
14 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.

#5 @nacin
14 years ago

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.

#6 @nacin
14 years ago

  • 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.

#7 @nacin
14 years ago

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

Note: See TracTickets for help on using tickets.