Merge "Don't check for LIBXML_PARSEHUGE presence"
[lhc/web/wiklou.git] / includes / htmlform / HTMLForm.php
index c6882c4..44e703b 100644 (file)
@@ -159,6 +159,7 @@ class HTMLForm extends ContextSource {
                'checkmatrix' => HTMLCheckMatrix::class,
                'cloner' => HTMLFormFieldCloner::class,
                'autocompleteselect' => HTMLAutoCompleteSelectField::class,
+               'language' => HTMLSelectLanguageField::class,
                'date' => HTMLDateTimeField::class,
                'time' => HTMLDateTimeField::class,
                'datetime' => HTMLDateTimeField::class,
@@ -344,11 +345,7 @@ class HTMLForm extends ContextSource {
 
                        $setSection =& $loadedDescriptor;
                        if ( $section ) {
-                               $sectionParts = explode( '/', $section );
-
-                               while ( count( $sectionParts ) ) {
-                                       $newName = array_shift( $sectionParts );
-
+                               foreach ( explode( '/', $section ) as $newName ) {
                                        if ( !isset( $setSection[$newName] ) ) {
                                                $setSection[$newName] = [];
                                        }
@@ -1285,7 +1282,7 @@ class HTMLForm extends ContextSource {
                        if ( $status->isGood() ) {
                                $elementstr = '';
                        } else {
-                               $elementstr = $this->getOutput()->parse(
+                               $elementstr = $this->getOutput()->parseAsInterface(
                                        $status->getWikiText()
                                );
                        }