Fix false Namespaceselector value for "all" on Special:LinkSearch
authorFlorian <florian.schmidt.welzow@t-online.de>
Thu, 7 May 2015 16:01:38 +0000 (18:01 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Sat, 23 May 2015 20:07:50 +0000 (20:07 +0000)
Added the ability to define the value in HTMLSelectNamespace.

Bug: T98496
Follow-Up: I8503c391a40f1654f8570578a9de9015d86c9845
Change-Id: Ic6a871507a027d28b3aeb1efeb9abbceb5734a9e

includes/htmlform/HTMLSelectNamespace.php
includes/specials/SpecialLinkSearch.php

index 9638106..b2ec9ca 100644 (file)
@@ -4,10 +4,12 @@
  */
 class HTMLSelectNamespace extends HTMLFormField {
        function getInputHTML( $value ) {
+               $allValue = ( isset( $this->mParams['all'] ) ? $this->mParams['all'] : 'all' );
+
                return Html::namespaceSelector(
                        array(
                                'selected' => $value,
-                               'all' => 'all'
+                               'all' => $allValue
                        ), array(
                                'name' => $this->mName,
                                'id' => $this->mID,
index 0c02628..f5218ac 100644 (file)
@@ -140,6 +140,7 @@ class LinkSearchPage extends QueryPage {
                                        'label-message' => 'linksearch-ns',
                                        'default' => $namespace,
                                        'id' => 'namespace',
+                                       'all' => '',
                                        'cssclass' => 'namespaceselector',
                                ),
                        );