mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Prepare DB queries in more places. Props filosofo. see #6644
git-svn-id: https://develop.svn.wordpress.org/trunk@7645 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -86,7 +86,7 @@ if ( !empty($tb_url) && !empty($title) ) {
|
||||
$comment_content = "<strong>$title</strong>\n\n$excerpt";
|
||||
$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'");
|
||||
$dupe = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url) );
|
||||
if ( $dupe )
|
||||
trackback_response(1, 'We already have a ping from that URL for this post.');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user