Make WordPress Core

Ticket #10790: comment-template.php.diff

File comment-template.php.diff, 1.0 KB (added by secondv, 15 years ago)
  • comment-template.php

     
    862862        if ( $user_ID) {
    863863                $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) )  ORDER BY comment_date_gmt", $post->ID, $user_ID));
    864864        } else if ( empty($comment_author) ) {
    865                 $comments = get_comments( array('post_id' => $post->ID, 'status' => 'approve', 'order' => 'ASC') );
     865                $comments = get_comments( array('post_id' => $post->ID, 'order' => 'ASC') );
    866866        } else {
    867867                $comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, wp_specialchars_decode($comment_author,ENT_QUOTES), $comment_author_email));
    868868        }