X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLSelectAndOtherField.php;h=65176dd7ac4b525f289d3ae3bc465c1ecc172b51;hb=dd107dda969ac77b86a89b0e98fcf85352c6035d;hp=bb42d532b8c519ad23ffcaa9b1b8493f84641d36;hpb=402183cb84c2f7978bc105a0a00cd00f0b676540;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLSelectAndOtherField.php b/includes/htmlform/HTMLSelectAndOtherField.php index bb42d532b8..65176dd7ac 100644 --- a/includes/htmlform/HTMLSelectAndOtherField.php +++ b/includes/htmlform/HTMLSelectAndOtherField.php @@ -26,7 +26,8 @@ class HTMLSelectAndOtherField extends HTMLSelectField { throw new MWException( 'HTMLSelectAndOtherField called without any options' ); } if ( !in_array( 'other', $this->mOptions, true ) ) { - $this->mOptions[$params['other']] = 'other'; + // Have 'other' always as first element + $this->mOptions = array( $params['other'] => 'other' ) + $this->mOptions; } $this->mFlatOptions = self::flattenOptions( $this->getOptions() ); @@ -60,9 +61,9 @@ class HTMLSelectAndOtherField extends HTMLSelectField { } /** - * @param $request WebRequest + * @param WebRequest $request * - * @return Array("","","") */ function loadDataFromRequest( $request ) { if ( $request->getCheck( $this->mName ) ) {