Add CollationFa
[lhc/web/wiklou.git] / includes / htmlform / HTMLSelectNamespace.php
index d6d564e..ef21969 100644 (file)
@@ -5,31 +5,32 @@
 class HTMLSelectNamespace extends HTMLFormField {
        public function __construct( $params ) {
                parent::__construct( $params );
-               $this->mAllValue = isset( $this->mParams['all'] ) ? $this->mParams['all'] : 'all';
+
+               $this->mAllValue = array_key_exists( 'all', $params )
+                       ? $params['all']
+                       : 'all';
+
        }
 
        function getInputHTML( $value ) {
                return Html::namespaceSelector(
-                       array(
+                       [
                                'selected' => $value,
                                'all' => $this->mAllValue
-                       ), array(
+                       ], [
                                'name' => $this->mName,
                                'id' => $this->mID,
                                'class' => 'namespaceselector',
-                       )
+                       ]
                );
        }
 
        public function getInputOOUI( $value ) {
-               return new MediaWiki\Widget\NamespaceInputWidget( array(
-                       'valueNamespace' => $value,
-                       'nameNamespace' => $this->mName,
+               return new MediaWiki\Widget\NamespaceInputWidget( [
+                       'value' => $value,
+                       'name' => $this->mName,
                        'id' => $this->mID,
                        'includeAllValue' => $this->mAllValue,
-                       // Disable additional checkboxes
-                       'nameInvert' => null,
-                       'nameAssociated' => null,
-               ) );
+               ] );
        }
 }