Commit graph

105017 commits

Author SHA1 Message Date
jenkins-bot
acfa994485 Merge "Inject services into Mcr(Undo|Restore)Action" 2021-08-04 22:45:44 +00:00
jenkins-bot
fc925ec724 Merge "Inject services into InfoAction" 2021-08-04 22:44:54 +00:00
jenkins-bot
def349289f Merge "tests: Swap assertion order in unit tests" 2021-08-04 19:07:36 +00:00
jenkins-bot
7b85c9645d Merge "RELEASE-NOTES: fix typo (where -> were)" 2021-08-04 18:46:34 +00:00
jenkins-bot
8f26db676f Merge "MockHttpTrait: convenience to mock HTTP timeout" 2021-08-04 18:35:45 +00:00
Umherirrender
134045b9aa tests: Swap assertion order in unit tests
Changes from patch set Icb93c79f4843b59dae80d3eda1a880457a1a68f2
Also some swaps from assertEquals to assertSame/True/False/Null

Change-Id: Ife497ae6cb1888b77eb25e85b76df72adc65641a
2021-08-04 20:21:01 +02:00
DannyS712
b8b44a6de9 Inject services into Mcr(Undo|Restore)Action
Bug: T253078
Change-Id: I7519f41df37a47a56bfb2d4419b52860ca1bb732
2021-08-04 18:04:43 +00:00
DannyS712
0450da0f52 Inject services into InfoAction
Bug: T253078
Change-Id: I23022089f20695f88665a2990627e8f655266efa
2021-08-04 18:04:37 +00:00
DannyS712
73498323fc RELEASE-NOTES: fix typo (where -> were)
Bug: T253078
Follow-up: I250ca12c73d866d1ecea8bd2e37296b4c0118050
Change-Id: I997bb50144abc86fc74bb83773bcb938e27f4860
2021-08-04 18:03:22 +00:00
Srđan
81dd7da45f Update and expand MessagesBs.php
This patch covers the following changes to the MessagesBs.php file:
* Updates: Correct typos currently present in the file
* Standardization: Use a consistent alias format and allow aliases with and without underscores
* Consistency: Use existing TranslateWiki strings to prioritize certain aliases

Bug: T288033
Change-Id: I8f3df0069b7482ad570fed8450785280d022db72
2021-08-04 12:08:41 +00:00
jenkins-bot
b1a1d243dd Merge "Inject services into SearchFormWidget" 2021-08-04 07:45:34 +00:00
Translation updater bot
bf3fef8e0b Localisation updates from https://translatewiki.net.
Change-Id: I0b3f0bacb7834b4eca23b01890c85ca7b7fd0ea3
2021-08-04 08:03:08 +02:00
jenkins-bot
57b01f4a02 Merge "Replace deprecated Language::getVariants in WebRequest" 2021-08-04 03:03:44 +00:00
jenkins-bot
955a727aaf Merge "api: Use fake timer to test ApiQueryLanguageinfo" 2021-08-04 02:48:16 +00:00
jenkins-bot
8a39ceb48c Merge "search: Replace deprecated Language::autoConvertToAllVariants" 2021-08-04 02:31:54 +00:00
Umherirrender
9b41241cc8 api: Use fake timer to test ApiQueryLanguageinfo
The difference is that previously we used microtime(), which provides a
float, and now time() is used, which provides an int, but there is no
difference for the comparison.

Change-Id: If1463e0fc2a2526ab4d2af64830b73ae3bf330f6
2021-08-04 02:27:04 +00:00
jenkins-bot
8664debf3a Merge "Replace deprecated Language::getPreferredVariant in AuthManager" 2021-08-04 02:23:40 +00:00
jenkins-bot
e49bf73c5a Merge "Replace deprecated CommentStore::getStore in RevDelLogItem" 2021-08-04 02:23:35 +00:00
jenkins-bot
cfa0b43ea4 Merge "Replace deprecated Language function in generateSitemap.php script" 2021-08-04 02:18:51 +00:00
jenkins-bot
59114ad5d1 Merge "Language: Replace deprecated User functions" 2021-08-04 02:14:47 +00:00
jenkins-bot
da3d784fa1 Merge "Replace deprecated User::getOption in LanguageConverter" 2021-08-04 02:12:51 +00:00
Umherirrender
98315b01e0 Replace deprecated Language::getPreferredVariant in AuthManager
Use the already provided content language to get the language converter
for the content language

Bug: T252095
Change-Id: I2bc085d5ca8ce2570e6da21128ea785799c958e5
2021-08-03 18:58:12 -07:00
Umherirrender
63c6b77d2a Inject services into SearchFormWidget
Replace deprecated Language::convertNamespace

Necessary services in SpecialSearch already injected

Explicit pass content language to existing call to make different more
visible between both calls

Bug: T252095
Change-Id: I4d4bd6e1246e57d952b73cb99a4a129028d7ff5b
2021-08-04 03:40:20 +02:00
Umherirrender
a29b542d6f search: Replace deprecated Language::autoConvertToAllVariants
Bug: T252095
Change-Id: Ibe8c40bbee873520dd86333d85e7c6f82555d425
2021-08-04 03:36:51 +02:00
Umherirrender
ed6fc1dcb4 Replace deprecated CommentStore::getStore in RevDelLogItem
Change-Id: Id47e0fa26f1846be0313288275c903ab073c50bb
2021-08-04 03:26:57 +02:00
Umherirrender
38460cc839 Replace deprecated Language function in generateSitemap.php script
Bug: T252095
Change-Id: Id93ecdd9e60413faf9408092ad11842c9b91b042
2021-08-04 02:58:28 +02:00
Alexander Vorwerk
135595a818 Remove unnecessary use statement
I10d2b32bd95316e1331b5eb88ef57de55c3ca1a1 removed the last usage of MediaWikiTestCaseTrait, thus the use statement can be removed.

Change-Id: I05b3b56abc8079abd294e453c78128858ef8ea7d
2021-08-04 00:54:08 +00:00
Umherirrender
03219ddb37 Replace deprecated User::getOption in LanguageConverter
Bug: T277600
Change-Id: I3967ddbe2f7bcb3b904647bf75affec688fce953
2021-08-04 02:36:18 +02:00
Umherirrender
3018cdc3d9 Language: Replace deprecated User functions
Changed interface back to real class for private
getHumanTimestampInternal, an user object is always passed,
because the user object is needed for the hook

Change-Id: I88a4915a875bd85173d86fc5da27d0d1a32bceff
2021-08-04 01:01:25 +02:00
Umherirrender
1764467a6e Replace deprecated Language::getVariants in WebRequest
Bug: T252095
Change-Id: Iaf30c0e4a828fd2a46d8addd39f0888ff06c1e2f
2021-08-04 00:50:15 +02:00
jenkins-bot
c0a326408d Merge "mediawiki.language: Adjust order of special characters useful in Korean" 2021-08-03 19:42:00 +00:00
MarikoBriggs
ae63a96849 mediawiki.language: Adjust order of special characters useful in Korean
Plus add corner brackets (「」, 『』) to toolbar.

Bug: T272573
Change-Id: I69e9234f874787afb1d507c2765fbeaba43ab4e2
2021-08-03 21:19:44 +02:00
jenkins-bot
ac39dd2d84 Merge "rdbms: Log the transaction write query duration" 2021-08-03 18:45:01 +00:00
Reedy
67c2c25a14 Updating wikimedia/relpath (2.1.1 => 3.0.0)
Change-Id: I83339f7ab340bc20667955f3cf1592982f6844ee
Depends-On: Ia77ffc78b48d4158691b23b5e09cd7a187a0eb62
2021-08-03 18:20:27 +01:00
jenkins-bot
6f84a9f2a0 Merge "Remove duplicate CREDITS entry for ST47" 2021-08-03 16:13:14 +00:00
Petr Pchelko
0a4958150a MockHttpTrait: convenience to mock HTTP timeout
Two enhancements:
1. If the status code of the mocked response is >= 400,
the Status object returned by the mock request should actually
be fatal, not good.
2. Convenience method to create a mock request that will
result in a timeout response, compatible with real timeout.

Change-Id: I4c3aab6ab88695729b4f398dacf3575fbdb4dad4
2021-08-03 09:09:09 -07:00
jenkins-bot
41ca1816f1 Merge "Add a hook 'GetActionName' to allow overriding the action name" 2021-08-03 15:27:07 +00:00
jenkins-bot
a06a42d62f Merge "Replace Assert::parameterType with typehints" 2021-08-03 14:49:42 +00:00
TChin
077b9af960 Replace Assert::parameterType with typehints
Bug: T287530
Change-Id: I6060e194339614b53e3a9c036ff3a3ac2e68f8df
2021-08-03 10:03:48 -04:00
Stevie Beth Mhaol
141866b5b0 mailmap: Add mapping for my name/email address.
Change-Id: Ie7c3f68f6b752979fefc3907b86a8d7e7a111592
2021-08-03 15:53:58 +02:00
Acamicamacaraca
ee8bd22e05 Update and expand special page aliases for Serbian
This patch includes:
* Format standardization of aliases. The format with underscores is more comprehensible and readable to speakers of the Serbian variety.
* Minor language correction for Serbian Cyrillic ("API_песак" -> "Песак_API-ја") and harmonization with the corresponding translations on translatewiki.net ("ОбрисаниДоприноси" -> "Избрисани_доприноси").
* Adding Latin aliases. Until today, there were no Latin aliases for special pages. This made it difficult to link and find them.

Bug: T185421
Change-Id: Ibbd1859ecc98fcb3330039badf30a079aa418ae5
2021-08-03 06:19:07 +00:00
Translation updater bot
1516b7ebf9 Localisation updates from https://translatewiki.net.
Change-Id: I59e0ca3417f11879feeebafcda7995b07552bfdc
2021-08-03 07:59:33 +02:00
Tim Starling
4e01588774 rdbms: Log the transaction write query duration
* Pass perfLogger through from LBFactory to LoadBalancer. Previously it
  was always NullLogger.
* Use it to log the calculated pending write query duration so that we
  can monitor how close it was to throwing an exception.

Bug: T287859
Change-Id: I6865baeee993e9254455de904f40d2d1abaffa4d
2021-08-03 15:02:43 +10:00
jenkins-bot
884179e259 Merge "ILoadBalancer: Rename approveMasterChanges() to approvePrimaryChanges()" 2021-08-03 03:36:21 +00:00
jenkins-bot
6300c3f846 Merge "ILoadBalancer: Rename finalizeMasterChanged() to finalizePrimaryChanges()" 2021-08-03 03:33:40 +00:00
James D. Forrester
05c1945b41 ILoadBalancer: Rename approveMasterChanges() to approvePrimaryChanges()
Bug: T282894
Change-Id: Iccc7f2ea22ae78fd9d947f88220d10aa5601f1c2
2021-08-03 03:16:57 +00:00
jenkins-bot
2aaa8c93b5 Merge "Html::openElement() micro-optimisations" 2021-08-02 18:59:03 +00:00
James D. Forrester
8eb07a8ef4 ILoadBalancer: Rename finalizeMasterChanged() to finalizePrimaryChanges()
Bug: T282894
Change-Id: Ic863ee6ec1d6e6488db77dd697ac7422d105f3ca
2021-08-02 18:15:12 +00:00
James D. Forrester
1d71fd91d6 ILoadBalancer and IDatabase: Rename getMasterPos to getPrimaryPos
Bug: T282894
Change-Id: I30a600335af735a13a6ad2d3df56a5f17e05bfab
2021-08-02 18:14:41 +00:00
Tim Starling
5deb6a2a45 Html::openElement() micro-optimisations
* Use isset() instead of in_array()

In dropDefaults():
* Remove strtolower(), since the performance cost of running
  strtolower() on all attribute names far outweighs the performance
  benefit of dropping default values for attributes with non-canonical
  capitalisation. Attribute names with non-canonical case are extremely
  rare in the MediaWiki ecosystem. The change is harmless in the sense
  that a default attribute is semantically equivalent to an omitted
  attribute.
* Handle common cases first.
* Avoid value normalization when the attribute name is unknown.
* For class attributes, check if the value is empty using strict
  comparison rather than normalization.

In expandAttributes():
* If the value is an array, explode each element and add the parts to
  an array rather than doing implode() then explode().
* If the value is an array, check for spaces in the loop rather than
  calling array_diff().
* Replace $quote with a literal
* Skip the check for boolean attributes if we already know it is a
  space-separated attribute.
* Inline Sanitizer::encodeAttribute

Measuring instruction count per iteration with perf stat, averaged over
10M iterations, PS1. Test case:
Html::openElement('a', [ 'class' => [ 'foo', 'bar' ] ] )

* Baseline: 11160.7265433
* in_array(): 10390.3837233
* dropDefaults() changes: 9674.1248824
* expandAttributes() misc: 9248.1947500
* implode/explode and space check: 8318.9800417
* Sanitizer inline: 8021.7371794

Change-Id: I7680b8939da50430316d77d42ebc1987752e99dc
2021-08-02 18:10:59 +00:00