Changeset 2556 for trunk/wp-includes/functions-post.php
- Timestamp:
- 04/20/2005 03:37:23 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-post.php
r2523 r2556 481 481 $now_gmt = current_time('mysql', 1); 482 482 483 if ( $user_id ) { 484 $userdata = get_userdata($user_id); 485 $post_author = $wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = '$comment_post_ID' LIMIT 1"); 486 } 487 483 488 // Simple flood-protection 484 489 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") ) { … … 497 502 if ( wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) ) 498 503 $approved = 'spam'; 499 504 if ( $userdata && ( $user_id == $post_author || $userdata['user_level'] >= 9 ) ) 505 $approved = 1; 506 500 507 $approved = apply_filters('pre_comment_approved', $approved); 501 508
Note: See TracChangeset
for help on using the changeset viewer.