]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-comments-list-table.php
Wordpress 3.2
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-comments-list-table.php
index 90c158fe6af50651914cc7beff93e14a16cd7e80..fd25129b676f7b472b13aed27a60a8740c2c0817 100644 (file)
@@ -21,7 +21,7 @@ class WP_Comments_List_Table extends WP_List_Table {
 
        var $pending_count = array();
 
-       function WP_Comments_List_Table() {
+       function __construct() {
                global $post_id;
 
                $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
@@ -29,7 +29,7 @@ class WP_Comments_List_Table extends WP_List_Table {
                if ( get_option('show_avatars') )
                        add_filter( 'comment_author', 'floated_admin_avatar' );
 
-               parent::WP_List_Table( array(
+               parent::__construct( array(
                        'plural' => 'comments',
                        'singular' => 'comment',
                        'ajax' => true,
@@ -110,6 +110,8 @@ class WP_Comments_List_Table extends WP_List_Table {
                        $_comment_post_ids[] = $_c->comment_post_ID;
                }
 
+               $_comment_post_ids = array_unique( $_comment_post_ids );
+
                $this->pending_count = get_pending_comments_num( $_comment_post_ids );
 
                $this->set_pagination_args( array(