Merge "Don't check for LIBXML_PARSEHUGE presence"
[lhc/web/wiklou.git] / includes / htmlform / HTMLFormField.php
index a88ab99..818474d 100644 (file)
@@ -137,8 +137,7 @@ abstract class HTMLFormField {
                for ( $i = count( $thisKeys ) - 1; $i >= 0; $i-- ) {
                        $keys = array_merge( array_slice( $thisKeys, 0, $i ), $nameKeys );
                        $data = $alldata;
-                       while ( $keys ) {
-                               $key = array_shift( $keys );
+                       foreach ( $keys as $key ) {
                                if ( !is_array( $data ) || !array_key_exists( $key, $data ) ) {
                                        continue 2;
                                }
@@ -462,16 +461,6 @@ abstract class HTMLFormField {
                if ( isset( $params['hide-if'] ) ) {
                        $this->mHideIf = $params['hide-if'];
                }
-
-               if ( isset( $this->mParams['notice-message'] ) ) {
-                       wfDeprecated( "'notice-message' parameter in HTMLForm", '1.32' );
-               }
-               if ( isset( $this->mParams['notice-messages'] ) ) {
-                       wfDeprecated( "'notice-messages' parameter in HTMLForm", '1.32' );
-               }
-               if ( isset( $this->mParams['notice'] ) ) {
-                       wfDeprecated( "'notice' parameter in HTMLForm", '1.32' );
-               }
        }
 
        /**
@@ -617,17 +606,11 @@ abstract class HTMLFormField {
                        $error = new OOUI\HtmlSnippet( $error );
                }
 
-               $notices = $this->getNotices( 'skip deprecation' );
-               foreach ( $notices as &$notice ) {
-                       $notice = new OOUI\HtmlSnippet( $notice );
-               }
-
                $config = [
                        'classes' => [ "mw-htmlform-field-$fieldType", $this->mClass ],
                        'align' => $this->getLabelAlignOOUI(),
                        'help' => ( $help !== null && $help !== '' ) ? new OOUI\HtmlSnippet( $help ) : null,
                        'errors' => $errors,
-                       'notices' => $notices,
                        'infusable' => $infusable,
                        'helpInline' => $this->isHelpInline(),
                ];
@@ -871,7 +854,7 @@ abstract class HTMLFormField {
         * @return bool
         */
        public function isHelpInline() {
-               return isset( $this->mParams['help-inline'] ) ? $this->mParams['help-inline'] : true;
+               return $this->mParams['help-inline'] ?? true;
        }
 
        /**
@@ -926,37 +909,6 @@ abstract class HTMLFormField {
                return $errors;
        }
 
-       /**
-        * Determine notices to display for the field.
-        *
-        * @since 1.28
-        * @deprecated since 1.32
-        * @param string $skipDeprecation Pass 'skip deprecation' to avoid the deprecation
-        *   warning (since 1.32)
-        * @return string[]
-        */
-       public function getNotices( $skipDeprecation = null ) {
-               if ( $skipDeprecation !== 'skip deprecation' ) {
-                       wfDeprecated( __METHOD__, '1.32' );
-               }
-
-               $notices = [];
-
-               if ( isset( $this->mParams['notice-message'] ) ) {
-                       $notices[] = $this->getMessage( $this->mParams['notice-message'] )->parse();
-               }
-
-               if ( isset( $this->mParams['notice-messages'] ) ) {
-                       foreach ( $this->mParams['notice-messages'] as $msg ) {
-                               $notices[] = $this->getMessage( $msg )->parse();
-                       }
-               } elseif ( isset( $this->mParams['notice'] ) ) {
-                       $notices[] = $this->mParams['notice'];
-               }
-
-               return $notices;
-       }
-
        /**
         * @return string HTML
         */