Changeset 1603 for trunk/wp-comments-post.php
- Timestamp:
- 09/05/2004 01:50:39 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-comments-post.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-comments-post.php
r1405 r1603 16 16 $_POST = add_magic_quotes($_POST); 17 17 $_COOKIE = add_magic_quotes($_COOKIE); 18 $_SERVER = add_magic_quotes($_SERVER); 18 19 } 19 20 … … 28 29 if (strlen($url) < 7) 29 30 $url = ''; 31 32 $user_agent = $_SERVER['HTTP_USER_AGENT']; 30 33 31 34 $comment = trim($_POST['comment']); … … 63 66 // If we've made it this far, let's post. 64 67 65 if( check_comment($author, $email, $url, $comment, $user_ip)) {68 if( check_comment($author, $email, $url, $comment, $user_ip, $user_agent) ) { 66 69 $approved = 1; 67 70 } else { … … 70 73 71 74 $wpdb->query("INSERT INTO $wpdb->comments 72 (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved )75 (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved, comment_agent) 73 76 VALUES 74 ('$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', '$now_gmt', '$comment', '$approved' )77 ('$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', '$now_gmt', '$comment', '$approved', '$user_agent') 75 78 "); 76 79
Note: See TracChangeset
for help on using the changeset viewer.