The anonymous function was equivalent to just specifying 'wfMessage'.
Same as in I355504984d343a2c7c469759f791612c5b6d6556 in Wikibase.
Change-Id: Ib94b7cceabce25ca95374d944255c7197e6a476a
Follows-Up: Ica0740049f0a3e8ec764903c5b71825e4d628a3f
Currently it is documented that mParent in HTMLFormField may be null.
This can happen if the form element is constructed manually via
new, instead of the normal way via HTMLForm methods.
As it stands, much of the code assumes that mParent is always set
despite the documentation. Lets mark creating form fields without
parent set as deprecated. The current situation seems like a
recipe for bugs, and after the deprecation period this would allow
us to simplify some of the HTMLFormField code.
Bug: T326456
Change-Id: Ica0740049f0a3e8ec764903c5b71825e4d628a3f
Depends-On: I15a39605e3eec8a5c265c4a331039fa906eda036
I would like to argue that it's useful to know if an error message is
returned, and if it's the correct one.
Bug: T306568
Change-Id: I865fa4c8a5b2d2d88d26c190352c852e63913a56
Make the 'interwiki' option temporarily accept null as well as true/false
(and default to null instead of false) so form fields which disallow
interwiki titles can avoid deprecation warnings. This also includes
implementing the new error message.
The idea is that for the duration of the deprecation process, form fields
can be set explicitly to interwiki => false (which will eventually become
the default). It would be super annoying to have to do this for all
title fields, but this way it's only needed for fields where users actually
submit interwiki titles with some frequency.
Also improve the logic for legacy fields (which do not set the option
either way): since these (while emitting a warning) allow an interwiki
title, it does not make sense to apply namespace etc. checks to that
title.
Bug: T288155
Change-Id: Ic00f4a0f27747b5ff0893b4c01f42f68a99771ab