Ticket #17152: 17152.diff
File 17152.diff, 714 bytes (added by , 13 years ago) |
---|
-
wp-includes/query.php
2155 2155 $search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}'))"; 2156 2156 $searchand = ' AND '; 2157 2157 } 2158 $term = esc_sql( like_escape( $q['s'] ) );2159 if ( empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] )2160 $search .= " OR ($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}')";2161 2158 2162 2159 if ( !empty($search) ) { 2163 2160 $search = " AND ({$search}) ";