Check for dupe trackbacks as well.

git-svn-id: https://develop.svn.wordpress.org/trunk@1939 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2004-12-12 18:27:31 +00:00
parent 0b4c37d9d3
commit 387168fec4

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 // Let's check that the remote site didn't already pingback this entry
$sql = 'SELECT * FROM '.$wpdb->comments.' $result = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post_ID' AND comment_author_url = '$pagelinkedfrom'");
WHERE comment_post_ID = '.$post_ID.'
AND comment_author_url = \''.$pagelinkedfrom.'\'
AND comment_type = \'pingback\'';
$result = $wpdb->get_results($sql);
//return($sql);
if ($wpdb->num_rows) { if ($wpdb->num_rows) {
// We already have a Pingback from this URL // 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.'); return new IXR_Error(49, 'Pingbacks not allowed on this entry.');
} }
$comment_post_ID = $post_ID; $comment_post_ID = $post_ID;
$comment_author = $title; $comment_author = $title;
$comment_author_url = $pagelinkedfrom; $comment_author_url = $pagelinkedfrom;