Changeset 7204

Show
Ignore:
Timestamp:
01/04/07 13:58:34 (2 years ago)
Author:
GamerZ
Message:

Author Stats Post Count Bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-stats/trunk/stats/stats.php

    r7203 r7204  
    224224 
    225225### Function: Get Author Stats 
    226 function get_authorsstats($display = true) { 
     226function get_authorsstats($mode = '', $display = true) { 
    227227      global $wpdb, $wp_rewrite; 
    228228      $where = ''; 
     
    235235                  $where = '(post_status = \'publish\' OR post_status = \'static\')'; 
    236236      } 
    237       $posts = $wpdb->get_results("SELECT COUNT($wpdb->posts.ID) AS 'posts_total', $wpdb->users.display_name,  $wpdb->users.user_nicename FROM $wpdb->posts LEFT JOIN $wpdb->users ON $wpdb->users.ID = $wpdb->posts.post_author AND user_activation_key = '' AND $where GROUP BY $wpdb->posts.post_author"); 
     237      $posts = $wpdb->get_results("SELECT COUNT($wpdb->posts.ID) AS 'posts_total', $wpdb->users.display_name,  $wpdb->users.user_nicename FROM $wpdb->posts LEFT JOIN $wpdb->users ON $wpdb->users.ID = $wpdb->posts.post_author WHERE user_activation_key = '' AND $where GROUP BY $wpdb->posts.post_author"); 
    238238      if($posts) { 
    239239            $using_permalink = get_settings('permalink_structure'); 
     
    503503                  $temp_stats .= '<p><strong>'.__('Authors', 'wp-stats').'</strong></p>'."\n"; 
    504504                  $temp_stats .= '<ol>'."\n"; 
    505                   $temp_stats .= get_authorsstats(false); 
     505                  $temp_stats .= get_authorsstats('', false); 
    506506                  $temp_stats .= '</ol>'."\n"; 
    507507            } 
  • wp-stats/trunk/stats/wp-stats.pot

    r7203 r7204  
    33"Project-Id-Version: WP-Stats 2.06\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2007-01-04 15:43+0800\n" 
     5"PO-Revision-Date: 2007-01-04 21:57+0800\n" 
    66"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 
    77"Language-Team: Lester Chan <gamerz84@homtail.com>\n"