X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2Ffields%2FHTMLSelectOrOtherField.php;h=91050a0cc672bc8d50a7cfa6b1d39f269f650406;hb=58c869edd257ac3b98b1167956ca98aac73ad2b8;hp=f6c0b07102adfa031d26069c798f3f3dcb739f40;hpb=36c9145c218c6effcfc672b89cc54579a2749cb4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/fields/HTMLSelectOrOtherField.php b/includes/htmlform/fields/HTMLSelectOrOtherField.php index f6c0b07102..91050a0cc6 100644 --- a/includes/htmlform/fields/HTMLSelectOrOtherField.php +++ b/includes/htmlform/fields/HTMLSelectOrOtherField.php @@ -12,9 +12,7 @@ class HTMLSelectOrOtherField extends HTMLTextField { $this->getOptions(); if ( !in_array( 'other', $this->mOptions, true ) ) { $msg = - isset( $params['other'] ) - ? $params['other'] - : wfMessage( 'htmlform-selectorother-other' )->text(); + $params['other'] ?? wfMessage( 'htmlform-selectorother-other' )->text(); // Have 'other' always as first element $this->mOptions = [ $msg => 'other' ] + $this->mOptions; } @@ -136,7 +134,7 @@ class HTMLSelectOrOtherField extends HTMLTextField { } public function getInputWidget( $params ) { - return new Mediawiki\Widget\SelectWithInputWidget( $params ); + return new MediaWiki\Widget\SelectWithInputWidget( $params ); } /**