Ticket #4108: comment-template.diff
| File comment-template.diff, 816 bytes (added by wnorris, 5 years ago) |
|---|
-
wp-includes/comment-template.php
288 288 extract($commenter); 289 289 290 290 // TODO: Use API instead of SELECTs. 291 if ( empty($comment_author) ) { 291 if ( $user_ID) { 292 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND (comment_approved = '1' OR ( user_id = '$user_ID' AND comment_approved = '0' ) ) ORDER BY comment_date"); 293 } else if ( empty($comment_author) ) { 292 294 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"); 293 295 } else { 294 296 $author_db = $wpdb->escape($comment_author);
