The global function wfWikiID() is deprecated since 1.35 and it's usages
should be replaced with WikiMap::getCurrentWikiId().
Bug: T298059
Change-Id: Idb937a82b08679f6552699ecc4a7ea1da7006e09
For some reason this is hard coded 5.1.4. But if you look at the
included binaries, the windows ones are clearly 5.1.5.
Change-Id: If0e7e6ae47b058b3d425b586955cc87a14b21eb8
This previously bypassed normalization because only the "value" part
of the internal exception message was normalized, the "module" part
can be invalid as well since it's derived from the original message.
Similar to Idc5514261e99d64222b86877dd0500d425a26988
Bug: T289358
Change-Id: I1ce09dd521eb80ba0d2fb6f84508a1a77d339496
This fixes an incompatibility introduced by Ia73ea587586cb69eb5.
Depends-On: I1f24703b80566220ac6fe8ee500e838ed7fd29af
Change-Id: I31ca0a8987f9694bc3b312a48c2c111ceda6fa3e
Extensions are supposed to return false to break hook chains when failed, which can avoid unnecessary call of later handlers in other extensions and work around with problems caused by difference betwen multiple triggers.
On mediawiki version 1.36 and before, just returning false in this hook can't display error message by default.
Set $status->value manually still to provide backward compatibility.
Bug: T280312
Change-Id: I935eb40d41c4bf9c123e131a54f6bfca2d517450
The MWNamespace class has been deprecated in favor of the NamespaceInfo
service. All methods in the MWNamespace should be replaced with the
equavilent methods of the NamespaceInfo service.
Change-Id: I964d3b191cc3129b8e467e6fbbccd2fcc0b89e11
On the Wikimedia cluster, 1.6% of MediaWiki wall-clock time is burnt on
calls from Lua into Scribunto_LuaSandboxCallback::frameExists()[1]. We
can optimize away many of these calls by not calling into PHP to check
if 'empty' or 'current' exist: the engine always reports that the
'empty' frame exists, and 'current' is guaranteed to have been set up
(in LuaEngine::setupCurrentFrames) prior to calling into Lua.
To help validate this, I added debug logging to the current production
branch of Scribunto[2] to see if there are any cases where
Scribunto_LuaSandboxCallback::frameExists('current') is false. As I
write this commit message, the logging code has been active for 24H and
there have not been any occurrences.
[1]: https://performance.wikimedia.org/arclamp/svgs/daily/2021-03-16.excimer-wall.all.reversed.svgz
[2]: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Scribunto/+/672836
Change-Id: I1902b711c9a442a5a42745a582a6a9ff988a355f
Remove using of User::getDefaultOption since this method will be hard-deprecated. Now it is soft-deprecated
Bug: T276035
Change-Id: I34a9ece7ee25c8fa85849c9dc8d6634cde53cfe5
The replacement, Parser::getStripState(), was added to MediaWiki in
1.34.
The extension.json for this extension already requires MW >= 1.35.
Bug: T275160
Change-Id: I062ac8b69756a7ad35d8cc744b4735fd2e70f13e
These new error messages were referring to formatDate instead of
formatNum.
Change-Id: Ic20a5a5515ee55d46087449627138cc779909ec3
Follow-up: Ib7706ad40f7ee2da6ab7c6b2dab6ae8d129dab52
Bug: T268758
The core formatNum method only works on strings which pass `is_numeric`,
not NaN and +/- infinity.
Bug: T267587
Change-Id: Ib7706ad40f7ee2da6ab7c6b2dab6ae8d129dab52
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.ObjectTypeHintParam
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic
* MediaWiki.Commenting.PropertyDocumentation.WrongStyle
Additional changes:
* Added the `wikimedia/mediawiki` profile in .eslintrc.json (T262222).
* Added the `wikimedia/jquery` profile in .eslintrc.json (T262222).
* Removed global `$`, included in the `wikimedia/jquery` profile (T262222).
* Removed global `mw`, included via `wikimedia/mediawiki` profile (T262222).
* Dropped the emtpy global definition in .eslintrc.json.
Change-Id: Ib0acbf92bcb8327ecd065db5db1083d7b222976c
Most of this function deals with values for the single
scribunto-limitreport-profile key, where $value is an array of
strings. Phan's security check plugin was getting confused because
*in general* the $value passed to a ParserLimitReportFormat hook can
be almost anything.
Change-Id: I0ef5ef71f00a92bd5db0df340725c88595fcb0c6
Avoids using the deprecated $noSeparators parameter to Language::formatNum
in favor of Language::formatNumNoSeparators, which has been around since
MW 1.21.
Change-Id: If3de5645a92514f605d4117fea3a820ed6c86624
Additional changes:
* Removed phan-taint-check-plugin from extra, now inherited from mediawiki-phan-config.
Change-Id: I83fff3a5ff566790bc051d7bfffe7f3b124d3de7
wfDebug() required a newline in the message. That is no need with
wfDebugLog() or with our PSR-3 logging interface.
Bug: T228848
Change-Id: Ieb3de1ab59174ec0e1301e42bccee6cebce8749f