From 387168fec4f1dd1928dcca0bce8e145e5850933b Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Sun, 12 Dec 2004 18:27:31 +0000 Subject: [PATCH] Check for dupe trackbacks as well. git-svn-id: https://develop.svn.wordpress.org/trunk@1939 602fd350-edb4-49c9-b593-d223f7449a82 --- xmlrpc.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/xmlrpc.php b/xmlrpc.php index 37ff265afb..766127ce6f 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -1151,12 +1151,7 @@ class wp_xmlrpc_server extends IXR_Server { // Let's check that the remote site didn't already pingback this entry - $sql = 'SELECT * FROM '.$wpdb->comments.' - WHERE comment_post_ID = '.$post_ID.' - AND comment_author_url = \''.$pagelinkedfrom.'\' - AND comment_type = \'pingback\''; - $result = $wpdb->get_results($sql); -//return($sql); + $result = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post_ID' AND comment_author_url = '$pagelinkedfrom'"); if ($wpdb->num_rows) { // We already have a Pingback from this URL @@ -1230,7 +1225,6 @@ class wp_xmlrpc_server extends IXR_Server { return new IXR_Error(49, 'Pingbacks not allowed on this entry.'); } - $comment_post_ID = $post_ID; $comment_author = $title; $comment_author_url = $pagelinkedfrom;