Check for dupe trackbacks as well.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-12-12 18:27:31 +00:00
parent de360e84e1
commit 06bacff67d

View File

@ -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;