WordPress.org

Make WordPress Core

Ticket #12131: 12131.diff

File 12131.diff, 876 bytes (added by aldenta, 6 years ago)
  • wp-admin/includes/dashboard.php

     
    482482        $comments = array(); 
    483483        $start = 0; 
    484484 
    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" ) ) { 
    486486 
    487487                foreach ( $possible as $comment ) { 
    488488                        if ( count( $comments ) >= 5 )