Make WordPress Core


Ignore:
Timestamp:
01/11/2005 02:56:43 AM (21 years ago)
Author:
saxmatt
Message:

Don't accept duplicate pings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-trackback.php

    r1964 r2080  
    8181    $comment_type = 'trackback';
    8282
     83    $dupe = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_author_url = '$comment_author_url'");
     84    if ( $dupe )
     85        trackback_response(1, 'We already have a ping from that URI for this post.');
     86
    8387    $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type');
    8488
Note: See TracChangeset for help on using the changeset viewer.