WordPress.org

Make WordPress Core

Changeset 10449


Ignore:
Timestamp:
01/28/2009 06:43:08 PM (12 years ago)
Author:
ryan
Message:

Include only approved comments when determining page of comment. Props GregMulhauser. fixes #8973 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r10273 r10449  
    593593
    594594    // Count comments older than this one
    595     $oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_date_gmt < '%s'" . $comtypewhere, $comment->comment_post_ID, $comment->comment_date_gmt ) );
     595    $oldercoms = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = 0 AND comment_approved = '1' AND comment_date_gmt < '%s'" . $comtypewhere, $comment->comment_post_ID, $comment->comment_date_gmt ) );
    596596
    597597    // No older comments? Then it's page #1.
Note: See TracChangeset for help on using the changeset viewer.