mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 22:58:40 +02:00
Duplicate comments should be allowed under a different comment parent. props andy. fixes #21609.
git-svn-id: http://core.svn.wordpress.org/trunk@22229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
65534a21c0
commit
8762f64494
@ -669,7 +669,7 @@ function wp_allow_comment($commentdata) {
|
||||
|
||||
// Simple duplicate check
|
||||
// expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content)
|
||||
$dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_approved != 'trash' AND ( comment_author = '$comment_author' ";
|
||||
$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' ";
|
||||
if ( $comment_author_email )
|
||||
$dupe .= "OR comment_author_email = '$comment_author_email' ";
|
||||
$dupe .= ") AND comment_content = '$comment_content' LIMIT 1";
|
||||
|
Loading…
Reference in New Issue
Block a user