[wp-cvs] wordpress wp-trackback.php,1.27,1.28
Matthew Mullenweg
saxmatt at users.sourceforge.net
Tue Jan 11 02:56:46 GMT 2005
Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32703
Modified Files:
wp-trackback.php
Log Message:
Don't accept duplicate pings
Index: wp-trackback.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-trackback.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** wp-trackback.php 16 Dec 2004 02:56:57 -0000 1.27
--- wp-trackback.php 11 Jan 2005 02:56:43 -0000 1.28
***************
*** 81,84 ****
--- 81,88 ----
$comment_type = 'trackback';
+ $dupe = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_author_url = '$comment_author_url'");
+ if ( $dupe )
+ trackback_response(1, 'We already have a ping from that URI for this post.');
+
$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type');
More information about the cvs
mailing list