Wordpress 2.6.2
[autoinstalls/wordpress.git] / wp-admin / includes / comment.php
index 0f2aa6140a7a29a5cef2b669aea72ce8289a962c..8a47fe6d2f4356133ce616e79b847b002aebe9e4 100644 (file)
@@ -3,8 +3,8 @@
 function comment_exists($comment_author, $comment_date) {
        global $wpdb;
 
-       return $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments
-                       WHERE comment_author = '$comment_author' AND comment_date = '$comment_date'");
+       return $wpdb->get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments
+                       WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) );
 }
 
 function edit_comment() {