From 9294a6cb6debc3f899aa6491f2e8bfb04870e254 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 26 May 2011 16:41:59 +0000 Subject: [PATCH] Remove duplicate sentence search terms. Props scribu. fixes #17152 git-svn-id: https://develop.svn.wordpress.org/trunk@18056 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 0b788dde86..292834da11 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2179,9 +2179,6 @@ class WP_Query { $search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}'))"; $searchand = ' AND '; } - $term = esc_sql( like_escape( $q['s'] ) ); - if ( empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) - $search .= " OR ($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}')"; if ( !empty($search) ) { $search = " AND ({$search}) ";