Making WordPress.org

Changeset 6639


Ignore:
Timestamp:
02/15/2018 10:10:37 AM (7 years ago)
Author:
Otto42
Message:

Plugin Directory: Sync ratings data at least daily, to prevent removal of bad reviews persisting for ages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-meta-sync.php

    r6287 r6639  
    6565        $current_review_time = $wpdb->get_var( 'SELECT MAX(`date`) FROM `ratings`' );
    6666
    67         if ( strtotime( $last_review_time ) >= strtotime( $current_review_time ) ) {
     67        // sync whenever ratings change, or at least daily, to prevent stale data from persisting forever
     68        if ( strtotime( $last_review_time ) >= strtotime( $current_review_time ) || strtotime( $last_review_time ) >= strtotime( '-1 day' ) ) {
    6869            return;
    6970        }
Note: See TracChangeset for help on using the changeset viewer.