Merge "Add Status::getStatusValue()"
[lhc/web/wiklou.git] / includes / htmlform / HTMLSelectOrOtherField.php
index 3e7acdf..8f7750c 100644 (file)
@@ -2,6 +2,9 @@
 
 /**
  * Select dropdown field, with an additional "other" textbox.
+ *
+ * HTMLComboboxField implements the same functionality using a single form field
+ * and should be used instead.
  */
 class HTMLSelectOrOtherField extends HTMLTextField {
        function __construct( $params ) {
@@ -13,7 +16,7 @@ class HTMLSelectOrOtherField extends HTMLTextField {
                                        ? $params['other']
                                        : wfMessage( 'htmlform-selectorother-other' )->text();
                        // Have 'other' always as first element
-                       $this->mOptions = array( $msg => 'other' ) + $this->mOptions;
+                       $this->mOptions = [ $msg => 'other' ] + $this->mOptions;
                }
 
        }
@@ -35,7 +38,7 @@ class HTMLSelectOrOtherField extends HTMLTextField {
 
                $select->setAttribute( 'class', 'mw-htmlform-select-or-other' );
 
-               $tbAttribs = array( 'id' => $this->mID . '-other', 'size' => $this->getSize() );
+               $tbAttribs = [ 'id' => $this->mID . '-other', 'size' => $this->getSize() ];
 
                if ( !empty( $this->mParams['disabled'] ) ) {
                        $select->setAttribute( 'disabled', 'disabled' );