Make WordPress Core

Ticket #14511: 14511_wp_parse_id_list.diff

File 14511_wp_parse_id_list.diff, 656 bytes (added by jamescollins, 11 years ago)
  • src/wp-includes/ms-functions.php

     
    20322032        $query = "SELECT * FROM $wpdb->blogs WHERE 1=1 ";
    20332033
    20342034        if ( isset( $args['network_id'] ) && ( is_array( $args['network_id'] ) || is_numeric( $args['network_id'] ) ) ) {
    2035                 $network_ids = array_map('intval', (array) $args['network_id'] );
    2036                 $network_ids = implode( ',', $network_ids );
     2035                $network_ids = implode( ',', wp_parse_id_list( $args['network_id'] ) );
    20372036                $query .= "AND site_id IN ($network_ids) ";
    20382037        }
    20392038