Remove duplicate sentence search terms. Props scribu. fixes #17152

git-svn-id: http://svn.automattic.com/wordpress/trunk@18056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-05-26 16:41:59 +00:00
parent ec8442d890
commit a7d3ff7df0
1 changed files with 0 additions and 3 deletions

View File

@ -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}) ";