X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22brouteur%22%2C%28%24id_rubrique%20?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLForm.php;h=d4351e03046222636704d77db862b3751b12e8b5;hb=d2b05e83e3a69009f9a1ec479fede3021d16299e;hp=399147b89afe50d46a1fde1b32d001ef699c6f5c;hpb=2c8f7978df47f338ee6e245e3efba6175ba425e9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 399147b89a..d4351e0304 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -285,7 +285,7 @@ class HTMLForm extends ContextSource { return ObjectFactory::constructClassInstance( OOUIHTMLForm::class, $arguments ); default: /** @var HTMLForm $form */ - $form = ObjectFactory::constructClassInstance( HTMLForm::class, $arguments ); + $form = ObjectFactory::constructClassInstance( self::class, $arguments ); $form->setDisplayFormat( $displayFormat ); return $form; } @@ -400,7 +400,13 @@ class HTMLForm extends ContextSource { if ( !in_array( $format, $this->availableDisplayFormats, true ) ) { throw new MWException( 'Display format must be one of ' . - print_r( $this->availableDisplayFormats, true ) ); + print_r( + array_merge( + $this->availableDisplayFormats, + $this->availableSubclassDisplayFormats + ), + true + ) ); } // Evil hack for mobile :(