WordPress.org

Make WordPress Core

Changeset 5727


Ignore:
Timestamp:
06/19/07 17:57:53 (8 years ago)
Author:
rob1n
Message:

Fix up wp_list_authors() SQL. fixes #4485

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/author-template.php

    r5708 r5727  
    379379 
    380380    $author_count = array(); 
    381     foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_status = 'publish' GROUP BY post_author") as $row) { 
     381    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author") as $row) { 
    382382        $author_count[$row->post_author] = $row->count; 
    383383    } 
Note: See TracChangeset for help on using the changeset viewer.