Merge "Remove perf tracking code that was moved to WikimediaEvents in Ib300af5c"
[lhc/web/wiklou.git] / includes / specials / SpecialUnblock.php
index 0d42e3f..56b6cc3 100644 (file)
@@ -57,9 +57,9 @@ class SpecialUnblock extends SpecialPage {
 
                $out = $this->getOutput();
                $out->setPageTitle( $this->msg( 'unblockip' ) );
-               $out->addModules( [ 'mediawiki.special', 'mediawiki.userSuggest' ] );
+               $out->addModules( [ 'mediawiki.special' ] );
 
-               $form = new HTMLForm( $this->getFields(), $this->getContext() );
+               $form = HTMLForm::factory( 'ooui', $this->getFields(), $this->getContext() );
                $form->setWrapperLegendMsg( 'unblockip' );
                $form->setSubmitCallback( [ __CLASS__, 'processUIUnblock' ] );
                $form->setSubmitTextMsg( 'ipusubmit' );
@@ -87,12 +87,12 @@ class SpecialUnblock extends SpecialPage {
        protected function getFields() {
                $fields = [
                        'Target' => [
-                               'type' => 'text',
+                               'type' => 'user',
                                'label-message' => 'ipaddressorusername',
                                'autofocus' => true,
                                'size' => '45',
                                'required' => true,
-                               'cssclass' => 'mw-autocomplete-user', // used by mediawiki.userSuggest
+                               'ipallowed' => true,
                        ],
                        'Name' => [
                                'type' => 'info',
@@ -186,7 +186,7 @@ class SpecialUnblock extends SpecialPage {
                        return [ [ 'ipb_cant_unblock', $target ] ];
                }
 
-               # bug 15810: blocked admins should have limited access here.  This
+               # T17810: blocked admins should have limited access here.  This
                # won't allow sysops to remove autoblocks on themselves, but they
                # should have ipblock-exempt anyway
                $status = SpecialBlock::checkUnblockSelf( $target, $performer );