Don't show spam comments in search results.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-01-17 23:32:20 +00:00
parent d3c2c2852f
commit 953b919fdc
1 changed files with 3 additions and 2 deletions

View File

@ -54,11 +54,12 @@ endif;
if (isset($_GET['s'])) {
$s = $wpdb->escape($_GET['s']);
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE
comment_author LIKE '%$s%' OR
(comment_author LIKE '%$s%' OR
comment_author_email LIKE '%$s%' OR
comment_author_url LIKE ('%$s%') OR
comment_author_IP LIKE ('%$s%') OR
comment_content LIKE ('%$s%')
comment_content LIKE ('%$s%') ) AND
comment_approved != 'spam'
ORDER BY comment_date DESC");
} else {
if ( isset($_GET['offset']) )