Fix behaviour of namespaceSelector to match the documentation
[lhc/web/wiklou.git] / includes / Html.php
index 9fcdc52..f4a3b55 100644 (file)
@@ -810,6 +810,14 @@ class Html {
                        );
                }
 
+               if ( !array_key_exists( 'id', $selectAttribs ) ) {
+                       $selectAttribs['id'] = 'namespace';
+               }
+
+               if ( !array_key_exists( 'name', $selectAttribs ) ) {
+                       $selectAttribs['name'] = 'namespace';
+               }
+
                $ret = '';
                if ( isset( $params['label'] ) ) {
                        $ret .= Html::element(