Changeset 8720 for trunk/wp-includes/comment.php
- Timestamp:
- 08/24/2008 06:56:22 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r8622 r8720 392 392 $dupe .= "OR comment_author_email = '$comment_author_email' "; 393 393 $dupe .= ") AND comment_content = '$comment_content' LIMIT 1"; 394 if ( $wpdb->get_var($dupe) ) 394 if ( $wpdb->get_var($dupe) ) { 395 if ( defined('DOING_AJAX') ) 396 die( __('Duplicate comment detected; it looks as though you\'ve already said that!') ); 397 395 398 wp_die( __('Duplicate comment detected; it looks as though you\'ve already said that!') ); 399 } 396 400 397 401 do_action( 'check_comment_flood', $comment_author_IP, $comment_author_email, $comment_date_gmt ); … … 444 448 if ( $flood_die ) { 445 449 do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment); 450 451 if ( defined('DOING_AJAX') ) 452 die( __('You are posting comments too quickly. Slow down.') ); 453 446 454 wp_die( __('You are posting comments too quickly. Slow down.') ); 447 455 } … … 753 761 $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 754 762 $commentdata['user_ID'] = (int) $commentdata['user_ID']; 763 764 $commentdata['comment_parent'] = absint($commentdata['comment_parent']); 765 $parent_status = ( 0 < $commentdata['comment_parent'] ) ? wp_get_comment_status($commentdata['comment_parent']) : ''; 766 $commentdata['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $commentdata['comment_parent'] : 0; 755 767 756 768 $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] );
Note: See TracChangeset
for help on using the changeset viewer.