From 69291131ff1c098d6a7a227605e9518d56e307b1 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Tue, 11 Jan 2005 18:47:07 +0000 Subject: [PATCH] http://mosquito.wordpress.org/view.php?id=668 git-svn-id: http://svn.automattic.com/wordpress/trunk@2082 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions-post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index e891f13648..65d0f2a0e0 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -447,9 +447,10 @@ function wp_new_comment( $commentdata, $spam = false ) { 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") ) { $time_lastcomment = mysql2date('U', $lasttime); $time_newcomment = mysql2date('U', $now_gmt); - if ( ($time_newcomment - $time_lastcomment) < 15 ) + if ( ($time_newcomment - $time_lastcomment) < 15 ) { do_action('comment_flood_trigger', ''); die( __('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') ); + } } if ( check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) )