Merge "Fix and make some types in PHPDoc and JSDoc tags more specific"
[lhc/web/wiklou.git] / includes / specials / pagers / UsersPager.php
index 7fa03ba..cdb9130 100644 (file)
@@ -275,44 +275,45 @@ class UsersPager extends AlphabeticPager {
                        $groupOptions[ $groupText ] = $group;
                }
 
-               $optionsDefault = [];
-               if ( $this->editsOnly ) {
-                       $optionsDefault[] = 'editsOnly';
-               }
-               if ( $this->creationSort ) {
-                       $optionsDefault[] = 'creationSort';
-               }
-               if ( $this->mDefaultDirection ) {
-                       $optionsDefault[] = 'desc';
-               }
-
                $formDescriptor = [
                        'user' => [
                                'class' => 'HTMLUserTextField',
                                'label' => $this->msg( 'listusersfrom' )->text(),
                                'name' => 'username',
-                               'value' => $this->requestedUser,
+                               'default' => $this->requestedUser,
                        ],
                        'dropdown' => [
-                               'label' => $this->msg( 'group' ),
+                               'label' => $this->msg( 'group' )->text(),
                                'name' => 'group',
-                               'value' => $this->requestedGroup,
+                               'default' => $this->requestedGroup,
                                'class' => 'HTMLSelectField',
                                'options' => $groupOptions,
                        ],
-                       'options' => [
-                               'class' => 'HTMLMultiSelectField',
-                               'options' => [
-                                       $this->msg( 'listusers-editsonly' )->text() => 'editsOnly',
-                                       $this->msg( 'listusers-creationsort' )->text() => 'creationSort',
-                                       $this->msg( 'listusers-desc' )->text() => 'desc'
-                               ],
-                               'default' => $optionsDefault
+                       'editsOnly' => [
+                               'type' => 'check',
+                               'label' => $this->msg( 'listusers-editsonly' )->text(),
+                               'name' => 'editsOnly',
+                               'id' => 'editsOnly',
+                               'default' => $this->editsOnly
+                       ],
+                       'creationSort' => [
+                               'type' => 'check',
+                               'label' => $this->msg( 'listusers-creationsort' )->text(),
+                               'name' => 'creationSort',
+                               'id' => 'creationSort',
+                               'default' => $this->creationSort
+                       ],
+                       'desc' => [
+                               'type' => 'check',
+                               'label' => $this->msg( 'listusers-desc' )->text(),
+                               'name' => 'desc',
+                               'id' => 'desc',
+                               'default' => $this->mDefaultDirection
                        ],
                        'limithiddenfield' => [
                                'class' => 'HTMLHiddenField',
                                'name' => 'limit',
-                               'value' => $this->mLimit
+                               'default' => $this->mLimit
                        ]
                ];
 
@@ -346,6 +347,7 @@ class UsersPager extends AlphabeticPager {
                $htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() );
                $htmlForm
                        ->setMethod( 'get' )
+                       ->setAction( Title::newFromText( $self )->getLocalURL() )
                        ->setId( 'mw-listusers-form' )
                        ->setFormIdentifier( 'mw-listusers-form' )
                        ->suppressDefaultSubmit()