Comments: Do not flag a comment as a duplicate if the comment_author_email is provided but not a match.

This reduces the strictness of the duplicate check a little, but does prevent false duplicates for emoji or +1 comments by authors with matching names. The current logic was introduced all the way back in [2894].

Fixes #37093.
Built from https://develop.svn.wordpress.org/trunk@37713


git-svn-id: http://core.svn.wordpress.org/trunk@37679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Rachel Baker 2016-06-15 14:51:27 +00:00
parent bd2fafae0a
commit 15b4fa81d2
2 changed files with 2 additions and 2 deletions

View File

@ -600,7 +600,7 @@ function wp_allow_comment( $commentdata ) {
);
if ( $commentdata['comment_author_email'] ) {
$dupe .= $wpdb->prepare(
"OR comment_author_email = %s ",
"AND comment_author_email = %s ",
wp_unslash( $commentdata['comment_author_email'] )
);
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37712';
$wp_version = '4.6-alpha-37713';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.