From 300bf47a9a0680f4d9b21f437d42bfc140761b00 Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 7 May 2015 18:01:38 +0200 Subject: [PATCH] Fix false Namespaceselector value for "all" on Special:LinkSearch Added the ability to define the value in HTMLSelectNamespace. Bug: T98496 Follow-Up: I8503c391a40f1654f8570578a9de9015d86c9845 Change-Id: Ic6a871507a027d28b3aeb1efeb9abbceb5734a9e --- includes/htmlform/HTMLSelectNamespace.php | 4 +++- includes/specials/SpecialLinkSearch.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/htmlform/HTMLSelectNamespace.php b/includes/htmlform/HTMLSelectNamespace.php index 96381062df..b2ec9caa94 100644 --- a/includes/htmlform/HTMLSelectNamespace.php +++ b/includes/htmlform/HTMLSelectNamespace.php @@ -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, diff --git a/includes/specials/SpecialLinkSearch.php b/includes/specials/SpecialLinkSearch.php index 0c026282f8..f5218ac50f 100644 --- a/includes/specials/SpecialLinkSearch.php +++ b/includes/specials/SpecialLinkSearch.php @@ -140,6 +140,7 @@ class LinkSearchPage extends QueryPage { 'label-message' => 'linksearch-ns', 'default' => $namespace, 'id' => 'namespace', + 'all' => '', 'cssclass' => 'namespaceselector', ), ); -- 2.20.1