Make WordPress Core

Changeset 17180


Ignore:
Timestamp:
12/30/2010 06:06:33 PM (14 years ago)
Author:
ryan
Message:

Fix registered and path column sorting. Props garyc40. fixes #16034

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-sites-list-table.php

    r17129 r17180  
    4242        if ( !$s && ( get_blog_count() >= 10000 ) ) {
    4343            if ( !isset($_REQUEST['orderby']) )
    44                 $_GET['orderby'] = $_REQUEST['orderby'] = 'id';
     44                $_GET['orderby'] = $_REQUEST['orderby'] = '';
    4545            if ( !isset($_REQUEST['order']) )
    4646                $_GET['order'] = $_REQUEST['order'] = 'DESC';
     
    7979        }
    8080
    81         $order_by = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : 'id';
     81        $order_by = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : '';
    8282        if ( $order_by == 'registered' ) {
    8383            $query .= ' ORDER BY registered ';
     
    8585            $query .= ' ORDER BY last_updated ';
    8686        } elseif ( $order_by == 'blogname' ) {
    87             $query .= ' ORDER BY domain ';
     87            if ( is_subdomain_install() )
     88                $query .= ' ORDER BY domain ';
     89            else
     90                $query .= ' ORDER BY path ';
     91        } elseif ( $order_by == 'blog_id' ) {
     92            $query .= ' ORDER BY blog_id ';
    8893        } else {
    8994            $order_by = null;
     
    156161            'blogname'    => 'blogname',
    157162            'lastupdated' => 'lastupdated',
    158             'registered'  => 'id',
     163            'registered'  => 'blog_id',
    159164        );
    160165    }
Note: See TracChangeset for help on using the changeset viewer.