From 78b8a561148cd23029d7f88bdc8a60f12d47e870 Mon Sep 17 00:00:00 2001 From: DannyS712 Date: Sat, 15 Aug 2020 06:37:19 +0000 Subject: [PATCH] Remove mentions of mw.htmlform.Checker mw.htmlform.Checker was removed in 743edb1 and no longer exists Change-Id: Id269f63fd3ca64a719745868d6df907548c15fad --- includes/htmlform/HTMLFormField.php | 3 --- resources/src/mediawiki.htmlform.ooui/Element.js | 1 - .../src/mediawiki.special.createaccount/HtmlformChecker.js | 6 +++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index ecafa4c453e..082776521d5 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -1160,9 +1160,6 @@ abstract class HTMLFormField { * @since 1.18 */ protected static function formatErrors( $errors ) { - // Note: If you change the logic in this method, change - // htmlform.Checker.js to match. - if ( is_array( $errors ) && count( $errors ) === 1 ) { $errors = array_shift( $errors ); } diff --git a/resources/src/mediawiki.htmlform.ooui/Element.js b/resources/src/mediawiki.htmlform.ooui/Element.js index 6d4fefb5d16..979651be788 100644 --- a/resources/src/mediawiki.htmlform.ooui/Element.js +++ b/resources/src/mediawiki.htmlform.ooui/Element.js @@ -1,6 +1,5 @@ ( function () { - // FIXME: mw.htmlform.Checker also sets this to empty object mw.htmlform = {}; /** diff --git a/resources/src/mediawiki.special.createaccount/HtmlformChecker.js b/resources/src/mediawiki.special.createaccount/HtmlformChecker.js index 74b166a4acb..0f7c3bf7245 100644 --- a/resources/src/mediawiki.special.createaccount/HtmlformChecker.js +++ b/resources/src/mediawiki.special.createaccount/HtmlformChecker.js @@ -2,7 +2,7 @@ * A helper class to add validation to non-OOUI HtmlForm fields. * * @private - * @class mw.htmlform.Checker + * @class HtmlformChecker * * @constructor * @param {jQuery} $element Form field generated by HTMLForm @@ -32,7 +32,7 @@ function HtmlformChecker( $element, validator ) { * * @param {jQuery} [$extraElements] Additional elements to listen for change * events on. - * @return {mw.htmlform.Checker} + * @return {HtmlformChecker} * @chainable */ HtmlformChecker.prototype.attach = function ( $extraElements ) { @@ -102,7 +102,7 @@ HtmlformChecker.prototype.validate = function () { * `
` or `
  • `, as with jQuery.append(). * @param {boolean} [forceReplacement] Set true to force a visual replacement even * if the errors are the same. Ignored if errors are empty. - * @return {mw.htmlform.Checker} + * @return {HtmlformChecker} * @chainable */ HtmlformChecker.prototype.setErrors = function ( valid, errors, forceReplacement ) {