WordPress.org

Make WordPress Core

Ticket #10944: comment.php.diff

File comment.php.diff, 768 bytes (added by scribu, 5 years ago)
  • comment.php

     
    490490 
    491491        // Simple duplicate check 
    492492        // expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content) 
    493         $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND ( comment_author = '$comment_author' "; 
     493        $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_approved <> 'trash' AND ( comment_author = '$comment_author' "; 
    494494        if ( $comment_author_email ) 
    495495                $dupe .= "OR comment_author_email = '$comment_author_email' "; 
    496496        $dupe .= ") AND comment_content = '$comment_content' LIMIT 1";