WordPress.org

Make WordPress Core

Changeset 5238


Ignore:
Timestamp:
04/11/07 03:12:11 (7 years ago)
Author:
rob1n
Message:

Tweak displaying comments awaiting moderation to their authors. Props wnorris. fixes #4108

File:
1 edited

Legend:

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

    r5165 r5238  
    289289 
    290290    // 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) ) {  
    292294        $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"); 
    293295    } else { 
Note: See TracChangeset for help on using the changeset viewer.