From 06bacff67deab1f255b4398679610033ae4847f8 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sun, 12 Dec 2004 18:27:31 +0000 Subject: [PATCH] Check for dupe trackbacks as well. git-svn-id: http://svn.automattic.com/wordpress/trunk@1939 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- xmlrpc.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/xmlrpc.php b/xmlrpc.php index 37ff265af..766127ce6 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;