Make WordPress Core


Ignore:
Timestamp:
03/21/2004 08:31:33 AM (21 years ago)
Author:
saxmatt
Message:

New comment moderation code, for trackbacks and comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-comments-post.php

    r956 r984  
    7676
    7777if ($ok) { // if there was no comment from this IP in the last 10 seconds
    78     $comment_moderation = get_settings('comment_moderation');
    7978    $moderation_notify = get_settings('moderation_notify');
    8079    $comments_notify = get_settings('comments_notify');
    8180
    82     // o42: this place could be the hook for further comment spam checking
    83     // $approved should be set according the final approval status
    84     // of the new comment
    85     if ('manual' == $comment_moderation) {
     81    if(check_comment($author, $email, $url, $comment, $user_ip)) {
     82        $approved = 1;
     83    } else {
    8684        $approved = 0;
    87     } else if ('auto' == $comment_moderation) {
    88         $approved = 0;
    89     } else { // none
    90         $approved = 1;
    9185    }
     86
    9287    $wpdb->query("INSERT INTO $tablecomments
    93     (comment_ID, comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved)
     88    (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved)
    9489    VALUES
    95     ('0', '$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', '$comment', '$approved')
     90    ('$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', '$comment', '$approved')
    9691    ");
    9792
Note: See TracChangeset for help on using the changeset viewer.