SpecialProtectedpages: Remove options not used by HTMLForm
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 10 Jan 2018 22:08:02 +0000 (23:08 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 10 Jan 2018 22:13:41 +0000 (23:13 +0100)
HTMLForm gets the selected value from the request. The values
specified in the form descriptor were never used. (You can specify a
default value, but that uses the 'default' key anyway.)

Change-Id: I095ee004cbe74470f33c72b391b22dd4395bff6e

includes/specials/SpecialProtectedpages.php

index 2ef9eaf..ac34996 100644 (file)
@@ -101,7 +101,6 @@ class SpecialProtectedpages extends SpecialPage {
                                'name' => 'namespace',
                                'id' => 'namespace',
                                'cssclass' => 'namespaceselector',
-                               'selected' => $namespace,
                                'all' => '',
                                'label' => $this->msg( 'namespace' )->text(),
                        ],
@@ -112,21 +111,18 @@ class SpecialProtectedpages extends SpecialPage {
                                'label' => $this->msg( 'protectedpages-indef' )->text(),
                                'name' => 'indefonly',
                                'id' => 'indefonly',
-                               'value' => $indefOnly
                        ],
                        'cascadecheck' => [
                                'type' => 'check',
                                'label' => $this->msg( 'protectedpages-cascade' )->text(),
                                'name' => 'cascadeonly',
                                'id' => 'cascadeonly',
-                               'value' => $cascadeOnly
                        ],
                        'redirectcheck' => [
                                'type' => 'check',
                                'label' => $this->msg( 'protectedpages-noredirect' )->text(),
                                'name' => 'noredirect',
                                'id' => 'noredirect',
-                               'value' => $noRedirect,
                        ],
                        'sizelimit' => [
                                'class' => 'HTMLSizeFilterField',
@@ -166,7 +162,6 @@ class SpecialProtectedpages extends SpecialPage {
                return [
                        'type' => 'select',
                        'options' => $options,
-                       'value' => $pr_type,
                        'label' => $this->msg( 'restriction-type' )->text(),
                        'name' => $this->IdType,
                        'id' => $this->IdType,
@@ -200,7 +195,6 @@ class SpecialProtectedpages extends SpecialPage {
                return [
                        'type' => 'select',
                        'options' => $options,
-                       'value' => $pr_level,
                        'label' => $this->msg( 'restriction-level' )->text(),
                        'name' => $this->IdLevel,
                        'id' => $this->IdLevel