Ticket #12131: 12131.diff
File 12131.diff, 876 bytes (added by , 15 years ago) |
---|
-
wp-admin/includes/dashboard.php
482 482 $comments = array(); 483 483 $start = 0; 484 484 485 while ( count( $comments ) < 5 && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) {485 while ( count( $comments ) < 5 && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->comments.comment_post_ID = $wpdb->posts.ID WHERE $wpdb->posts.post_status != 'trash' ORDER BY $wpdb->comments.comment_date_gmt DESC LIMIT $start, 50" ) ) { 486 486 487 487 foreach ( $possible as $comment ) { 488 488 if ( count( $comments ) >= 5 )