Commit graph

98557 commits

Author SHA1 Message Date
jenkins-bot
165cd0ae85 Merge "Use $msg2 in CoreParserFunctionsTest::testGender" 2020-09-17 07:05:52 +00:00
Translation updater bot
866a8d9af0 Localisation updates from https://translatewiki.net.
Change-Id: I0805323a8711a0abeb8caf4cb922b82ae323cba7
2020-09-17 08:31:20 +02:00
jenkins-bot
c23df2f20d Merge "emptyUserGroup.php: handle more than 5000 users" 2020-09-17 03:21:59 +00:00
jenkins-bot
e893e72565 Merge "MediaWikiIntegrationTestCase docs: call parent::setUp()" 2020-09-17 03:18:46 +00:00
Reedy
813bd8114a Use $msg2 in CoreParserFunctionsTest::testGender
Bug: T263091
Change-Id: Ifd5bcab9e3aba16ddf4b86d7e28971507bee696a
2020-09-17 03:26:43 +01:00
jenkins-bot
f5dbe34bcd Merge "objectcache: Add QoS flags to HashBagOStuff" 2020-09-17 01:44:59 +00:00
jenkins-bot
4a98d8c686 Merge "LBFactory: use HashBagOStuff in CLI mode" 2020-09-17 01:35:30 +00:00
daniel
d75b45ee2f objectcache: Add QoS flags to HashBagOStuff
Change-Id: I571c860ef9dd32a1eb374d59738f6e9e74b19fc2
2020-09-17 01:25:29 +00:00
DannyS712
6beacf6504 MediaWikiIntegrationTestCase docs: call parent::setUp()
The example should be a good one

Change-Id: I398f36eb427b52d8f9016d75bea90917c2dabee5
2020-09-17 01:10:45 +00:00
jenkins-bot
84cacf8382 Merge "BlockPermissionChecker: Add docs to constructor" 2020-09-16 23:51:58 +00:00
jenkins-bot
2cf57ee08c Merge "BlockPermissionCheckerFactory: Make accepted targets in line with AbstractBlock::parseTarget" 2020-09-16 23:51:53 +00:00
Martin Urbanec
29521ee632 BlockPermissionChecker: Add docs to constructor
Change-Id: I588f63c29cc33d1d5f2db195c3fb8b2c43403b5b
2020-09-16 23:00:27 +00:00
Martin Urbanec
b4180d5c02 BlockPermissionCheckerFactory: Make accepted targets in line with AbstractBlock::parseTarget
BlockPermissionChecker uses AbstractBlock::parseTarget
to parse the target (if not done already), and we should
accept the same types to avoid confusion.

Change-Id: Idc96ae55c565eddc7cd1a3ea7305db0ea405f9bb
2020-09-17 00:58:05 +02:00
jenkins-bot
4975fde492 Merge "Hard deprecate File::userCan() with $user=null" 2020-09-16 21:08:09 +00:00
Gergő Tisza
e42adfd1d9
emptyUserGroup.php: handle more than 5000 users
User::findUsersByGroup has a hard limit of 5000 users, so put it
in a loop. While we are there, replace a deprecated method, handle
failures and make the output a bit more pretty.

Change-Id: I5cc93f17a70dfcdc6ed5f1b57e11ebfd7bf9d76c
2020-09-16 12:56:02 -07:00
jenkins-bot
b3eea91e21 Merge "Add import permissions to new import grant" 2020-09-16 18:34:16 +00:00
daniel
e4ab85d44b LBFactory: use HashBagOStuff in CLI mode
When the "local server cache" falls back to EmptyBagOStuff in CLI mode,
this may cause performance degradation in DB related code. This ensures
we have at least in-process caching in place.

Bug: T254430
Change-Id: I08061e3033a3da2f6f618969c080d31da0c6af79
2020-09-16 17:36:22 +00:00
C. Scott Ananian
5e703cdf66 Hard deprecate File::userCan() with $user=null
The ArchivedFile::userCan and OldLocalFile::userCan() methods, along
with a number of other methods where the user parameter was optional,
were deprecated in 1.35, but this case was overlooked. This patch is
intended for backport to 1.35, so that the $user parameter can be
removed in 1.36 in accordance with the deprecation policy.

This path is known to be used by LocalRepo::findFile(),
FileRepo::findFile(), and FileRepo::findFileFromKey(), so hacky
workarounds have been added in this patch to avoid triggering
deprecation warnings in 1.35. T263033 has been filed to fix these
'correctly' in 1.36.

Bug: T263014
Change-Id: I17cab8ce043a5965aeab089392068b91c686025e
2020-09-16 12:27:51 -04:00
jenkins-bot
76ac517f40 Merge "resourceloader: Add skin-based 'mediawiki.skin.variables.less' import" 2020-09-16 15:09:39 +00:00
jenkins-bot
87f480d3b2 Merge "Revert "Remove support for (Archived|OldLocal)File::userCan without a user"" 2020-09-16 15:08:04 +00:00
jenkins-bot
74399847c7 Merge "Allow REST API Responses to be JsonSerializable objects" 2020-09-16 13:25:13 +00:00
Jforrester
a66e7a6b0c Revert "Remove support for (Archived|OldLocal)File::userCan without a user"
This reverts commit 264d043d04.

Reason for revert: Parsoid is still using this.

Bug: T263014
Change-Id: I9d6b65b319a45bbdbd479eda0d0580296ceb7f62
2020-09-16 10:47:49 +00:00
Martin Urbanec
b4f4c25403 Add import permissions to new import grant
Import lets you to attribute revisions to other users
(especially importupload), which makes it more sensitive
than purely mass editing.

Change-Id: If79e0e570fecf724ace23c1ba4de364043961258
2020-09-16 09:15:59 +02:00
Translation updater bot
61d36def2d Localisation updates from https://translatewiki.net.
Change-Id: Ifa129702383fa2f8c4910be007c542fda1100f46
2020-09-16 09:04:58 +02:00
Tim Starling
c7dc05550a Fix failure of rebuildLocalisationCache.php due to RL hook
rebuildLocalisationCache.php can fail when clearing the MessageBlobStore
due to a hook while constructing a ResourceLoader. This problem was also
encountered in T231866, but the fix was only applied to
ServiceWiring.php and not this duplicated code in
rebuildLocalisationCache.php.

So, fix rebuildLocalisationCache.php to similarly not construct a
ResourceLoader object.

Bug: T262900
Change-Id: I4e28c0f4e06efd219226154ab955395e00be504f
2020-09-16 05:05:18 +00:00
jenkins-bot
39cf44145f Merge "Move notification area to end of body" 2020-09-16 04:13:07 +00:00
Sam Wilson
7229375a27 Conform to selector-class-pattern for watchlist expiry class
This is a follow up to I9aba8cccc2ef75c59b78008723d0ae76d853c5f2
to add the 'mw-' prefix to the CSS class added there.

The whole of special.less has the stylelint selector-class-pattern
rule being excluded, so this wasn't picked up when it was first
added. For this reason, the disabling is moved to next-line form
and copied to all the remaining incorrect selectors (to avoid
this problem in the future).

Change-Id: Idfaec3ff3aa0e3ecc5217aa4a557a67378991757
2020-09-16 09:46:21 +08:00
Sam Wilson
54f6f10c58 Move notification area to end of body
This is a second take at moving the mw.notify area to be outside
the main $content element. It moves .mw-notification-area to be
at the end of the body, and adjusts its top offset to match that
of $content or (if a skin has provided its own area) the area.

This introduces a breaking change for skins that don't set their
own area and which assume that the starting offset of the area
matches that of $content. We've talked about this and it feels
more correct to do it this way and then have skins correct their
own display where required (Timeless for example already adds
an offset; we'll make patches for other skins as required).

Bug: T260413
Bug: T260262
Bug: T260432
Change-Id: I12db7c1745d17851f6421123a145de4cb916ad51
2020-09-16 09:03:39 +08:00
jenkins-bot
2d2f5dead6 Merge "EditPageTest: No need to set $wgUser" 2020-09-15 22:50:46 +00:00
jenkins-bot
91e08f59a2 Merge "UserTest: No need to set $wgUser" 2020-09-15 22:49:30 +00:00
jenkins-bot
ceee3d017f Merge "CheckBlocksSecondaryAuthenticationProviderTest: No need to set $wgUser" 2020-09-15 22:47:44 +00:00
jenkins-bot
d243661958 Merge "Language::translateBlockExpiry update $user docs" 2020-09-15 22:46:05 +00:00
jenkins-bot
13dc0e893d Merge "Tracking category and parser warning for deprecated uses of {{=}}" 2020-09-15 21:48:22 +00:00
jenkins-bot
448da261a2 Merge "Allow independent parser test files to (re)define articles w/ the same names" 2020-09-15 21:47:43 +00:00
DannyS712
dcb3e9cfd6 Language::translateBlockExpiry update $user docs
Also update for LanguageFi

Bug: T243708
Change-Id: Icb42980855d8b5db16cfef4a7dade0b341cb95bd
2020-09-15 21:47:08 +00:00
DannyS712
115635d743 EditPageTest: No need to set $wgUser
Bug: T243708
Change-Id: Ibf5d955891aebb1519edd5394bcd02de373bbaa1
2020-09-15 21:26:07 +00:00
DannyS712
8af8aaad0f UserTest: No need to set $wgUser
Bug: T243708
Change-Id: I8ba28ac21a08a7c466ad70727a21fb7a0c1a6275
2020-09-15 21:22:33 +00:00
DannyS712
1c086b938f CheckBlocksSecondaryAuthenticationProviderTest: No need to set $wgUser
Bug: T243708
Change-Id: Icb403dd8e4d28bafa0d5bf53526f905dc7ae2870
2020-09-15 21:20:56 +00:00
C. Scott Ananian
bfa4357d91 CoreParserFunctions: ensure formatNum is only called on numeric strings
The {{formatnum}} parser function can take anything, not just numeric
strings. We'd like to restrict Language::commafy() to operate only on
numeric strings, however (see T237467).  Split the argument to the
{{formatnum}} parser function so that we only invoke
Language::commafy() on numeric strings.  Add a tracking category so we
can (gradually) lint our content appropriately.

Bug: T237467
Change-Id: Ib6c832df1f69aa4579402701fad1f77e548291ee
2020-09-15 20:23:41 +00:00
C. Scott Ananian
aeb3f45c20 Tracking category and parser warning for deprecated uses of {{=}}
We plan to add {{=}} as a built-in parser function, expanding to `=`,
in the same way that `{{!}}` is a built-in.  It will be used to
automatically escape uses of `=` in template arguments (again, in the
same way that `{{!}}` can be used to protect uses of `|` in template
arguments).

Some wikis have non-standard definitions of `Template:=`; add a
tracking category to warn these wikis to transition before we turn on
the built-in parser function in a future release.

New parser test file added, so we can re-define Template:= and test
both cases of this new warning.

Bug: T91154
Change-Id: I50ff8a7b6be95901ebb14ffbe64940a0f499cfac
2020-09-15 20:16:37 +00:00
C. Scott Ananian
ce663741bc Allow independent parser test files to (re)define articles w/ the same names
It leads to surprising results when the definitions in one parser test
file leak into all the others.  This can cause spurious test failures
when you happen to have two extensions which define conflicting
article fixtures, and prevents you from using parser tests to test
patches like I50ff8a7b6be95901ebb14ffbe64940a0f499cfac, where you
deliberately want to set up and test two different definitions for the
same template name.

Change-Id: I958c6305a95ca32418d83b7f33f7c180a3b370cd
2020-09-15 16:15:44 -04:00
jenkins-bot
017ff4e8d3 Merge "Use word instead of substring selector in Parsoid skinning" 2020-09-15 20:00:23 +00:00
DannyS712
bc32baf912 ApiQueryUserInfo: Add theoreticalratelimits
Bug: T258888
Change-Id: If2848a4905ff165f1b1ba6f26aaad8697a3f7ea4
2020-09-15 18:56:56 +00:00
Arlo Breault
defc3f935b Use word instead of substring selector in Parsoid skinning
Follow up to a0921e6

Change-Id: I86447947e42981b23aea8d894d2d7bd05e0665d2
2020-09-15 14:55:29 -04:00
jenkins-bot
e259f0f87d Merge "Collapsible HTMLForms need to add JS module" 2020-09-15 17:59:01 +00:00
jenkins-bot
4b27e30a90 Merge "Provide link to view diff of deleted revision in missing-rev message" 2020-09-15 17:53:38 +00:00
jenkins-bot
4977bdfac5 Merge "Add release note for BaseTemplate::getToolbox" 2020-09-15 17:39:33 +00:00
jenkins-bot
e72406e22b Merge "Manually redirect in UploadFromUrl" 2020-09-15 17:16:04 +00:00
Ammar Abdulhamid
d954678e47 Add release note for BaseTemplate::getToolbox
Bug: T255321
Change-Id: I031d2e75d1ccdf7d2b6307a4ad646f6ab8ad1ecc
2020-09-15 17:02:18 +00:00
jdlrobson
741f0800ca Collapsible HTMLForms need to add JS module
Not working on Special:AbuseFilter for example
Skins can disable this module so special pages must
add it explicitly.

Bug: T260642
Change-Id: I51deedf9c60279b0917ab085fd7498edf55e93da
2020-09-15 17:01:46 +00:00