Changeset 12376
- Timestamp:
- 12/11/2009 11:29:19 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/comment.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r12321 r12376 551 551 if ( current_user_can( 'manage_options' ) ) 552 552 return; // don't throttle admins 553 if ( $lasttime = $wpdb->get_var( $wpdb->prepare("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_author_IP = %s OR comment_author_email = %s ORDER BY comment_date DESC LIMIT 1", $ip, $email) ) ) { 553 $hour_ago = gmdate( 'Y-m-d H:i:s', time() - 3600 ); 554 if ( $lasttime = $wpdb->get_var( $wpdb->prepare( "SELECT `comment_date_gmt` FROM `$wpdb->comments` WHERE `comment_date_gmt` >= %s AND ( `comment_author_IP` = %s OR `comment_author_email` = %s ) ORDER BY `comment_date_gmt` DESC LIMIT 1", $hour_ago, $ip, $email ) ) ) { 554 555 $time_lastcomment = mysql2date('U', $lasttime, false); 555 556 $time_newcomment = mysql2date('U', $date, false);
Note: See TracChangeset
for help on using the changeset viewer.