Deprecating something means to say something nasty about it, or to draw
its character into question. For example, "this function is lazy and good
for nothing". Deprecatory remarks by a developer are generally taken as a
warning that violence will soon be done against the function in question.
Other developers are thus warned to avoid associating with the deprecated
function.
However, since wfDeprecated() was introduced, it has become obvious that
the targets of deprecation are not limited to functions. Developers can
deprecate literally anything: a parameter, a return value, a file
format, Mondays, the concept of being, etc. wfDeprecated() requires
every deprecatory statement to begin with "use of", leading to some
awkward sentences. For example, one might say: "Use of your mouth to
cough without it being covered by your arm is deprecated since 2020."
So, introduce wfDeprecatedMsg(), which allows deprecation messages to be
specified in plain text, with the caller description being optionally
appended. Migrate incorrect or gramatically awkward uses of wfDeprecated()
to wfDeprecatedMsg().
Change-Id: Ib3dd2fe37677d98425d0f3692db5c9e988943ae8
“the styles of … ResourceLoader modules” suggests to me that this method
can be used with any ResourceLoader module(s), and their style parts
will be loaded as <link rel=stylesheet> while JavaScript parts will load
as usual, but this is not in fact the case: if ResourceLoaderClientHtml
encounters a module type other than LOAD_STYLES in the moduleStyles
modules, it logs an error and skips the module.
Change-Id: If0e709311c1b777f6d99cb714f19307c1015ec01
This option parallels the styles option. This reduces the need for skins
to extend getDefaultModules and groups skin scripts in a consistent
fashion.
Change-Id: Iaf12d575e691597dea398627f6d34cb425dbf9bb
When the left side of ?? is wrapped with [] the array has always one
item and that means it is always true and then used
Move the use of the array key into the existing isset
The empty array for $serversCheck is the default
Change-Id: I2ec95026b3cd5a72dcaf540f369b140fd7b69a53
It seems in the vast majority of cases (when $flags is 0 and
$this->mArticleID is already known) none of the conditions is true, and
this service is not needed. As this is a very basic, heavily used method
I feel it's worth avoiding unnecessary calls like this.
Change-Id: Ib668071ffe029f3318e110b9f791e400a2becc7a
'wgInternalRedirectTargetUrl' should be set using getLinkURL()
(which doesn't contain the domain) instead of getFullURL().
This is already the case for normal article redirects (see how
'wgInternalRedirectTargetUrl' is set in Article.php).
Bug: T255620
Change-Id: I77473bedd52bc51c8ef53d6bc695b6bf2ebd0bfd
HTMLForm can't detect whether a GET form was submitted or just viewed,
resulting in error messages about missing page title being shown on
the initial page view.
We were also doing some weird checks to distinguish the two forms by
the GET/POST method. Instead, use setFormIdentifier() to do it, which
avoids similar error messages about content model being shown before
the user had a chance to fill in that field.
Bug: T196514
Change-Id: Id007f2db5238ed2a8123c6cc309dce361b9220cb