Make WordPress Core


Ignore:
Timestamp:
09/05/2004 01:50:39 AM (22 years ago)
Author:
saxmatt
Message:

Track and check user agent for comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-trackback.php

    r1599 r1603  
    5555    $now_gmt = current_time('mysql', 1);
    5656
     57    $user_agent = addslashes($_SERVER['HTTP_USER_AGENT']);
     58
    5759    $comment = convert_chars($comment);
    5860    $comment = format_to_post($comment);
     
    6769    $moderation_notify = get_settings('moderation_notify');
    6870
    69     if(check_comment($author, $email, $url, $comment, $user_ip)) {
     71    if(check_comment($author, $email, $url, $comment, $user_ip, $user_agent)) {
    7072        $approved = 1;
    7173    } else {
     
    7476
    7577    $result = $wpdb->query("INSERT INTO $wpdb->comments
    76     (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved)
     78    (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)
    7779    VALUES
    78     ('$comment_post_ID', '$author', '$email', '$tb_url', '$user_ip', '$now', '$now_gmt', '$comment', '$approved')
     80    ('$comment_post_ID', '$author', '$email', '$tb_url', '$user_ip', '$now', '$now_gmt', '$comment', '$approved', '$user_agent')
    7981    ");
    8082
Note: See TracChangeset for help on using the changeset viewer.