Make WordPress Core

Ticket #42299: 42299.diff

File 42299.diff, 727 bytes (added by spacedmonkey, 8 years ago)
  • src/wp-includes/ms-load.php

     
    226226        }
    227227
    228228        $args = array(
    229                 'domain__in' => $domains,
    230                 'path__in' => $paths,
    231229                'number' => 1,
    232230        );
    233231
    234232        if ( count( $domains ) > 1 ) {
     233                $args['domain__in']               = $domains;
    235234                $args['orderby']['domain_length'] = 'DESC';
     235        } else {
     236                $args['domain'] = array_shift( $domains );
    236237        }
    237238
    238239        if ( count( $paths ) > 1 ) {
     240                $args['path__in']               = $paths;
    239241                $args['orderby']['path_length'] = 'DESC';
     242        } else {
     243                $args['path'] = array_shift( $paths );
    240244        }
    241245
    242246        $result = get_sites( $args );