Making WordPress.org


Ignore:
Timestamp:
05/01/2017 10:10:30 PM (9 years ago)
Author:
ocean90
Message:

Plugin Directory: Call array_unique() after merging touched tags (and revisions) to avoid duplicate imports.

File:
1 edited

Legend:

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

    r5453 r5458  
    2626                $next_scheduled_event = array_shift( $next_scheduled_events );
    2727
    28                 $next_scheduled_event['args'][0]['tags_touched'] = array_merge(
     28                $next_scheduled_event['args'][0]['tags_touched'] = array_unique( array_merge(
    2929                    $next_scheduled_event['args'][0]['tags_touched'],
    3030                    $plugin_data['tags_touched']
    31                 );
     31                ) );
    3232
    3333                if ( $plugin_data['readme_touched'] ) {
     
    4343                }
    4444
    45                 $next_scheduled_event['args'][0]['revisions'] = array_merge(
     45                $next_scheduled_event['args'][0]['revisions'] = array_unique( array_merge(
    4646                    $next_scheduled_event['args'][0]['revisions'],
    4747                    $plugin_data['revisions']
    48                 );
     48                ) );
    4949
    5050                $result = Manager::update_scheduled_event( "import_plugin_i18n:{$plugin_slug}", $next_scheduled, $next_scheduled_event );
Note: See TracChangeset for help on using the changeset viewer.