Make WordPress Core

Changeset 17556


Ignore:
Timestamp:
03/25/2011 08:12:32 PM (14 years ago)
Author:
azaozz
Message:

Fix discrepancy in the nested loop in the Recent Comments dashboard widget, props ocean90, fixes #16846 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r17129 r17556  
    610610        ? absint( $widgets['dashboard_recent_comments']['items'] ) : 5;
    611611
    612     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" ) ) {
     612    while ( count( $comments ) < $total_items && $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" ) ) {
    613613
    614614        foreach ( $possible as $comment ) {
Note: See TracChangeset for help on using the changeset viewer.