Allow descending-order sort of Special:ListUsers
authorJackmcbarn <jackmcbarn@gmail.com>
Sat, 28 Sep 2013 15:05:38 +0000 (11:05 -0400)
committerJackmcbarn <jackmcbarn@gmail.com>
Sat, 28 Sep 2013 15:06:19 +0000 (11:06 -0400)
Add an option to Special:ListUsers allowing it to be sorted in descending
order.

Change-Id: Icfff90a18a62f8f0b70e42313fc3285cf7e44c82

includes/specials/SpecialListusers.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 75b8490..8cd9173 100644 (file)
@@ -69,6 +69,7 @@ class UsersPager extends AlphabeticPager {
                $this->editsOnly = $request->getBool( 'editsOnly' );
                $this->creationSort = $request->getBool( 'creationSort' );
                $this->including = $including;
+               $this->mDefaultDirection = $request->getBool( 'desc' );
 
                $this->requestedUser = '';
 
@@ -277,6 +278,13 @@ class UsersPager extends AlphabeticPager {
                        'creationSort',
                        $this->creationSort
                );
+               $out .= '&#160;';
+               $out .= Xml::checkLabel(
+                       $this->msg( 'listusers-desc' )->text(),
+                       'desc',
+                       'desc',
+                       $this->mDefaultDirection
+               );
                $out .= '<br />';
 
                wfRunHooks( 'SpecialListusersHeaderForm', array( $this, &$out ) );
index 897f639..529c2c8 100644 (file)
@@ -2771,6 +2771,7 @@ It now redirects to [[$2]].',
 'listusers-summary'               => '', # do not translate or duplicate this message to other languages
 'listusers-editsonly'             => 'Show only users with edits',
 'listusers-creationsort'          => 'Sort by creation date',
+'listusers-desc'                  => 'Sort in descending order',
 'usereditcount'                   => '$1 {{PLURAL:$1|edit|edits}}',
 'usercreated'                     => '{{GENDER:$3|Created}} on $1 at $2',
 'newpages'                        => 'New pages',
index 96de359..f50039d 100644 (file)
@@ -4924,6 +4924,7 @@ See the following search results:
 'listusers' => '{{doc-special|ListUsers}}',
 'listusers-editsonly' => 'Option in [[Special:ListUsers]].',
 'listusers-creationsort' => 'Option in [[Special:ListUsers]].',
+'listusers-desc' => 'Option in [[Special:ListUsers]].',
 'usereditcount' => 'Shown behind every username on [[Special:ListUsers]]. Parameters:
 * $1 - number of edits',
 'usercreated' => 'Used in [[Special:ListUsers]]. Parameters:
index 43be195..991fc1b 100644 (file)
@@ -1841,6 +1841,7 @@ $wgMessageStructure = array(
                'listusers-summary',
                'listusers-editsonly',
                'listusers-creationsort',
+               'listusers-desc',
                'usereditcount',
                'usercreated',
                'newpages',