WordPress.org

Make WordPress Core

Changeset 22229


Ignore:
Timestamp:
10/14/12 17:06:37 (18 months ago)
Author:
nacin
Message:

Duplicate comments should be allowed under a different comment parent. props andy. fixes #21609.

File:
1 edited

Legend:

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

    r22110 r22229  
    670670    // Simple duplicate check 
    671671    // expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content) 
    672     $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_approved != 'trash' AND ( comment_author = '$comment_author' "; 
     672    $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_parent = '$comment_parent' AND comment_approved != 'trash' AND ( comment_author = '$comment_author' "; 
    673673    if ( $comment_author_email ) 
    674674        $dupe .= "OR comment_author_email = '$comment_author_email' "; 
Note: See TracChangeset for help on using the changeset viewer.