WordPress.org

Make WordPress Core

Changeset 12254


Ignore:
Timestamp:
11/21/09 11:31:21 (4 years ago)
Author:
azaozz
Message:

Ignore trashed comments for duplicate comment check, props scribu, fixes #10944

File:
1 edited

Legend:

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

    r12223 r12254  
    494494    // Simple duplicate check 
    495495    // expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content) 
    496     $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND ( comment_author = '$comment_author' "; 
     496    $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_approved != 'trash' AND ( comment_author = '$comment_author' "; 
    497497    if ( $comment_author_email ) 
    498498        $dupe .= "OR comment_author_email = '$comment_author_email' "; 
Note: See TracChangeset for help on using the changeset viewer.