Ticket #17859: 17859.2.diff
File 17859.2.diff, 920 bytes (added by , 14 years ago) |
---|
-
wp-admin/admin-ajax.php
1292 1292 if ( count($search_terms) > 1 && $search_terms[0] != $s ) 1293 1293 $search .= " OR ($wpdb->posts.post_title LIKE '%{$term}%') OR ($wpdb->posts.post_content LIKE '%{$term}%')"; 1294 1294 1295 $posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND post_status IN (' draft', 'publish') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" );1295 $posts = $wpdb->get_results( "SELECT ID, post_title, post_status, post_date FROM $wpdb->posts WHERE post_type = '$what' AND post_status IN ('publish', 'private', 'future', 'pending', 'draft') AND ($search) ORDER BY post_date_gmt DESC LIMIT 50" ); 1296 1296 1297 1297 if ( ! $posts ) { 1298 1298 $posttype = get_post_type_object($what);