From a7d3ff7df014e4711c17b1706c8da5b7b8983cf1 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 26 May 2011 16:41:59 +0000 Subject: [PATCH] Remove duplicate sentence search terms. Props scribu. fixes #17152 git-svn-id: http://svn.automattic.com/wordpress/trunk@18056 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 0b788dde8..292834da1 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}) ";