Changeset 2080

Show
Ignore:
Timestamp:
01/11/05 02:56:43 (4 years ago)
Author:
saxmatt
Message:

Don't accept duplicate pings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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