From: Bartosz Dziewoński Date: Fri, 17 Aug 2018 21:07:52 +0000 (+0200) Subject: HTMLForm: Remove parameters 'notice', 'notice-messages', 'notice-message' X-Git-Tag: 1.34.0-rc.0~3674^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=54d9b373cd4fbd86ab09d65609ecd969897fa3b0;p=lhc%2Fweb%2Fwiklou.git HTMLForm: Remove parameters 'notice', 'notice-messages', 'notice-message' Bug: T197179 Change-Id: I911cabc1e1e1c2abb8e91a55c05eaa1c76134087 --- diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index 3e55337fb5..30177514e4 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -56,6 +56,10 @@ because of Phabricator reports. * Language::truncate(), deprecated in 1.31, has been removed. * UtfNormal, deprecated in 1.25, was removed. Use UtfNormal\Validator directly instead. +* (T197179) In OOUI HTMLForm fields, the parameters 'notice', 'notice-messages', + and 'notice-message', which were deprecated in 1.32, were removed. Instead, + use 'help', 'help-message', and 'help-messages'. +* (T197179) HTMLFormField::getNotices(), deprecated in 1.32, was removed. * … === Deprecations in 1.33 === diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 52a18eb7b8..50c7e3e2ac 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -81,9 +81,6 @@ use Wikimedia\ObjectFactory; * 'help-inline' -- Whether help text (defined using options above) will be shown * inline after the input field, rather than in a popup. * Defaults to true. Only used by OOUI form fields. - * 'notice' -- (deprecated, use 'help' instead) - * 'notice-messages' -- (deprecated, use 'help-messages' instead) - * 'notice-message' -- (deprecated, use 'help-message' instead) * 'required' -- passed through to the object, indicating that it * is a required field. * 'size' -- the length of text fields diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 890299525e..5f99aa0ca5 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -462,16 +462,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 +607,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(), ]; @@ -926,37 +910,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 */