From: Florian Date: Thu, 7 May 2015 16:01:38 +0000 (+0200) Subject: Fix false Namespaceselector value for "all" on Special:LinkSearch X-Git-Tag: 1.31.0-rc.0~11316 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=300bf47a9a0680f4d9b21f437d42bfc140761b00;p=lhc%2Fweb%2Fwiklou.git 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 --- 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', ), );