Changeset 2561
- Timestamp:
- 04/20/2005 09:56:28 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-post.php
r2556 r2561 486 486 } 487 487 488 // Simple duplicate check 489 $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND ( comment_author = '$author' "; 490 if ( $email ) $dupe .= "OR comment_author_email = '$email' "; 491 $dupe .= ") AND comment_content = '$comment' LIMIT 1"; 492 if ( $wpdb->get_var($dupe) ) 493 die( __('Duplicate comment detected; it looks as though you\'ve already said that!') ); 494 488 495 // Simple flood-protection 489 496 if ( $lasttime = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_author_IP = '$user_ip' OR comment_author_email = '$email' ORDER BY comment_date DESC LIMIT 1") ) {
Note: See TracChangeset
for help on using the changeset viewer.