Ticket #10790: comment-template.php.diff
File comment-template.php.diff, 1.0 KB (added by , 15 years ago) |
---|
-
comment-template.php
862 862 if ( $user_ID) { 863 863 $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)); 864 864 } 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') ); 866 866 } else { 867 867 $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)); 868 868 }