Commit graph

101770 commits

Author SHA1 Message Date
DannyS712
db32346ccd WikitextStructureTest: combine single use methods
Change-Id: Ibdcd4d800a00c2b6c3fc3b9f64bff8e3ba47de32
2021-02-27 00:48:21 +00:00
Ed Sanders
cb871d2c2e ResetUserEmail: Call parent constructor first
This fixes the logic for working out which options
are script-specific, and which are generic.

Change-Id: I8fcdcda04c34b464fe0fc74aca57d3609feaa7a6
2021-02-27 00:10:09 +00:00
DannyS712
bab2c0099c Make ApiModuleManagerTest a pure unit test
Switch test case with services to use a
service other than ObjectFactory, to make
it easier to mock.

Change-Id: I374a516b6bcc8111b2432245faf935f8287d45a7
2021-02-26 22:41:46 +00:00
jenkins-bot
3bee692fca Merge "mergeMessageFileList.php: Improve error handling" 2021-02-26 22:12:09 +00:00
Ahmon Dancy
4433207f48 mergeMessageFileList.php: Improve error handling
If the call to file_put_contents fails, say something and exit
non-zero instead of silently ignoring the error.

Additionally, don't write a newline to STDERR in quiet mode.

Change-Id: I3b69c6c40fea6f689b6e1a4d550e87fafd200410
2021-02-26 21:29:11 +00:00
jenkins-bot
ba9bfcfebd Merge "Correct fi translation of 'img_upright'" 2021-02-26 21:20:06 +00:00
jenkins-bot
f9a932f538 Merge "IDatabase::update: Fix documentation of options" 2021-02-26 20:03:19 +00:00
Ed Sanders
5a9f53662a IDatabase::update: Fix documentation of options
Change-Id: I045dedeaf76e542c2b3e3eb451e1c9fa3b08becd
2021-02-26 19:29:20 +00:00
jenkins-bot
db16fcb6ac Merge "apisandbox.js - split DateTimeParamWidget to separate file" 2021-02-26 19:10:14 +00:00
jenkins-bot
f11645bf6a Merge "getText.php: add --revision option" 2021-02-26 18:50:33 +00:00
jenkins-bot
53366a1a2f Merge "Hard deprecate WatchedItem::getUser in favor of ::getUserIdentity" 2021-02-26 11:50:53 +00:00
Vadim Kovalenko
65af17e7c8 Hard deprecate WatchedItem::getUser in favor of ::getUserIdentity
Bug: T274972
Change-Id: I8815ea33cd534f497d7a935946e6ad250f828a7c
2021-02-26 03:29:45 -05:00
Translation updater bot
859b2f52d3 Localisation updates from https://translatewiki.net.
Change-Id: Ic5db2625abb86fadb879b9dec0c0ec81f1172fcd
2021-02-26 08:54:51 +01:00
jenkins-bot
08952a5dd6 Merge "Parse the wikitext of parse warning messages in live preview" 2021-02-26 00:18:08 +00:00
Reedy
63ef36b46a Updating wikimedia/composer-merge-plugin (v1.4.1 => v2.0.1)
Bug: T275824
Change-Id: Ifef6c81c3720137fa2cae296f537f3e164f6e4d1
Depends-On: Ia18240d26f9845d117935c3eb26347e6173e890e
2021-02-25 22:46:58 +00:00
jenkins-bot
ba44be20c5 Merge "Avoid unstubbing user in BlockErrorFormatter::getFormattedBlockErrorInfo" 2021-02-25 21:16:45 +00:00
01miki10
a8095130cc Correct fi translation of 'img_upright'
Per discussion at
https://fi.wikipedia.org/w/index.php?title=Wikipedia:Kahvihuone_(sekalaista)&oldid=19595241#Ohjeet_kuvan_k%C3%A4yt%C3%B6st%C3%A4_artikkelissa?

Change-Id: I941e912d5280b4aceff04c8eb302de432729b1ec
2021-02-25 21:10:38 +00:00
jenkins-bot
b16741f728 Merge "resourceloader: Add wikimedia/minify package and remove local copies" 2021-02-25 19:59:39 +00:00
jenkins-bot
e585399247 Merge "Use Authority for revision audience where possible" 2021-02-25 16:31:44 +00:00
James D. Forrester
921343b3f9 PHPVersionCheck: Complain about known-bad versions above minimum
For now, this complains about 7.4.0 – 7.4.8, and 7.3.0 - 7.3.18.

We will back-port this to the REL1_35 live release branch with
modifications as that requires 7.3.19+ already.

Bug: T246594
Bug: T270228
Change-Id: If5c7e3c1ba9dd9f6561c1de18130ded3aadc7149
2021-02-25 15:17:21 +00:00
jenkins-bot
9e22096c6d Merge "BlockUsers maintenance script: Allow setting of block flags" 2021-02-25 14:23:51 +00:00
Translation updater bot
a23841de03 Localisation updates from https://translatewiki.net.
Change-Id: Icb86fc781cf4bacbb7506abeb000f5885c0a69d0
2021-02-25 08:37:31 +01:00
jenkins-bot
6d388dfebe Merge "Extend iwlinks.iwl_prefix to VARBINARY(32) on MySQL" 2021-02-25 06:37:46 +00:00
jenkins-bot
8a2fddf85d Merge "mediawiki.user: Catch and fall back if getRandomValues fails" 2021-02-25 02:46:33 +00:00
jenkins-bot
fb31629af4 Merge "BlockUsers maintenance script: Avoid bug in hasOption" 2021-02-25 02:02:08 +00:00
Reedy
2290df4b6b Extend iwlinks.iwl_prefix to VARBINARY(32) on MySQL
Bug: T275242
Change-Id: I19252d2cd167832f7c429c31374e5e2dd3b89726
2021-02-25 01:49:36 +00:00
jenkins-bot
781d5c10d6 Merge "URL encode the username passed to prefs-user-downloaddata-help-message" 2021-02-24 21:19:30 +00:00
Timo Tijhof
245bdafd9e resourceloader: Add wikimedia/minify package and remove local copies
- JavaScriptMinifier: The public interface for this internal class is
  ResourceLoader::filter which, except for one caller (minify.php)
  is indeed consistently used already, no other callers need replacing.

- CSSMin: Idem for minification, however, this class has some other
  method as well, which have a number of internal users, but none
  outside core. These have all been replaced in this commit.

- Remove pear/net_url2 as own dependency as this was only used by CSSMin
  and recently added there. This is now a dependency of wikimedia/minify
  instead. This was not part of the public API and no longer mentioned
  here in composer.json or RELEASE-NOTES. (It remains pinned in
  mediawiki-vendor, however.)

Bug: T273247
Depends-On: Iadff8c2112d5e53bd994ab4882006e8c644a2379
Depends-On: Id3c6dcc0b952a9efe34b3a9ed88b716101a51f87
Depends-On: I589be910f57289fd908b22db87241b0e52da60d4
Change-Id: I8d71fc64aeecdb31db218b02e361ae9bb0d19b48
2021-02-24 21:03:02 +00:00
Ed Sanders
8cc67fa352 BlockUsers maintenance script: Allow setting of block flags
As all these flags are all true by default, create inverted
command line flags to selectively set them to false.

Change-Id: I19affd2d0c35799b537c987739a01fdbc2c35a13
2021-02-24 20:25:59 +00:00
David Lynch
68faccd098 URL encode the username passed to prefs-user-downloaddata-help-message
Usernames containing certain characters would otherwise break the link
generated in the message. Message documentation already says the name is
intended for being placed in links, and so presumably can be left as-is.

Bug: T275620
Change-Id: If03b034beb5dc56a8569602e604d0345b595d054
2021-02-24 13:44:28 -06:00
jenkins-bot
cbf94bdf7f Merge "Fix and add various type hints" 2021-02-24 19:20:21 +00:00
Lucas Werkmeister
293b061f29 SpecialPageFatalTest: tolerate failure to create page
Sometimes the special page can’t be created – for example, the list of
registered pages could have changed between the data provider and the
test function, due to extensions conditionally registering their special
pages. Skip the test in this case instead of crashing.

Bug: T275661
Change-Id: I573967ac22ed3a596b4f80b76d395ac948f802e8
2021-02-24 19:28:04 +01:00
Petr Pchelko
782a46f661 Use Authority for revision audience where possible
Depends-On: I963a79d94b9e39086940a43945def7c8eff1536d
Change-Id: If99d428b391c0eaf61396565af7f38740bef6c4a
2021-02-24 10:56:50 -07:00
Umherirrender
9284893744 Avoid unstubbing user in BlockErrorFormatter::getFormattedBlockErrorInfo
Allow to pass User object to Language::formatExpiry which does not
depend on global state when passing a user

Bug: T267445
Change-Id: Ibd2991b7f051f2a7635c5f4844c8cbfab473557e
2021-02-24 17:18:50 +01:00
Michael Holloway
540a350201 mediawiki.user: Catch and fall back if getRandomValues fails
When generating random session IDs (used primarily for EventLogging),
we preferentially make use of the WebCrypto API's getRandomValues
method. We have been seeing this method fail occasionally in Firefox
with OperationErrors. This change adds a try-catch block allowing us
to fall back to using Math.random to generate random values if the
crypto-based getRandomValues method fails.

Bug: T263041
Change-Id: I1473ea22884404f8f7b95457e5ddda835ce4e5a6
2021-02-24 10:20:30 -05:00
Thalia
21ab535b83 Fix filename in PageUpdater documentation
Change-Id: I7e3d238286f03b785c896a9b5db05af8c5f12fd9
2021-02-24 14:22:18 +00:00
Ed Sanders
6e2762c797 BlockUsers maintenance script: Avoid bug in hasOption
hasOption always returns true after getOption has been called
(T275619), so just use the result of getOption instead, which
will be a string or false.

Bug: T275627
Change-Id: I23b9a5258cc8ef3532eb18c5fa974c2989937c80
2021-02-24 14:17:01 +00:00
jenkins-bot
abc8f2aa06 Merge "ApiQueryUserContributions: use UserSelectQueryBuilder" 2021-02-24 09:39:30 +00:00
jenkins-bot
c6679ecf66 Merge "Make actor services usable with object factory." 2021-02-24 09:31:19 +00:00
jenkins-bot
b21683612a Merge "Convert skin code to Authority where ready" 2021-02-24 09:15:37 +00:00
Translation updater bot
98a5f0d78c Localisation updates from https://translatewiki.net.
Change-Id: I1616a87aa6b2c97e1ef7abd53952fde476cff07a
2021-02-24 08:50:18 +01:00
jenkins-bot
274705b0aa Merge "resourceloader: Fix FileModule resource URLs for document root wikis" 2021-02-24 06:02:29 +00:00
Tim Starling
e2a91921c5 resourceloader: Fix FileModule resource URLs for document root wikis
Per the comment in extractBasePaths(), remoteBasePath is typically '/'
when MediaWiki is installed in the document root. CSSMin knows what to
do with that, but getRemotePath() was getting it wrong, generating an
invalid protocol-relative URL.

So, add a simple hack for this case.

Change-Id: I16abf482e3a1a4a548c571de0e81cb3c1bdf55e1
2021-02-24 05:27:55 +00:00
Petr Pchelko
bb990c7e94 Convert skin code to Authority where ready
Change-Id: Ie530051d7abb3137e0e79114cb01dbb129ae0fe0
2021-02-23 21:04:19 -07:00
jenkins-bot
e0db57ee24 Merge "mediawiki.less: Add transition and animation variables" 2021-02-24 02:51:43 +00:00
jenkins-bot
56ea64221a Merge "mediawiki.less: Add colors, border variables and restructure file" 2021-02-24 02:51:29 +00:00
Petr Pchelko
7f38946a62 ApiQueryUserContributions: use UserSelectQueryBuilder
There's still room for improvement - batching users by prefix
can be abstracted into the UserSelectQueryBuilder, but I'll do that
separately. It still references actor_id, but that's because
we still have to explicitly query rev_user_temp, and different
paging will mess up the continuation. After completing actor
migration I think we can order the results differently.

Change-Id: I75ff6081f8ecb9fd0dcdd7bbd8b0c974ae71101c
2021-02-24 00:11:15 +00:00
Petr Pchelko
c3bdbb8bed Make actor services usable with object factory.
Change-Id: I75dce2f1131a936d79475f6f8f3474d4bf32b760
2021-02-24 00:11:07 +00:00
Bartosz Dziewoński
179816efcd Parse the wikitext of parse warning messages in live preview
Bug: T274883
Change-Id: I15048f821868605892dd939cc72e1fc631760c78
2021-02-24 00:46:09 +01:00
Bartosz Dziewoński
f59f43b7e0 SECURITY: Escape the wikitext of parse warning messages in live preview
Bug: T274883
Change-Id: I3a57a823fac94a56ce0211e22227499c0c7b2a51
2021-02-24 00:40:47 +01:00