WordPress.org

Make WordPress Core

Changeset 10450


Ignore:
Timestamp:
01/28/09 18:45:15 (5 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7/wp-includes/comment.php

    r10274 r10450  
    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.