Commit graph

6624 commits

Author SHA1 Message Date
Translation updater bot b7d55268c4 Localisation updates from https://translatewiki.net.
Change-Id: Ieb96bcaa92fb555941f203899482800c8be28ba3
2022-04-14 08:25:26 +02:00
jenkins-bot b94cd470db Merge "Inject dependencies into the authentication provider" 2022-04-12 13:17:53 +00:00
Translation updater bot 2c5657af32 Localisation updates from https://translatewiki.net.
Change-Id: Ia1e1a384359442ff7bd4003900b67993436a27a2
2022-04-12 08:13:21 +02:00
Translation updater bot 8fa07e6321 Localisation updates from https://translatewiki.net.
Change-Id: I97b81bb5b772394966f2898d5a11fbff6447d5b9
2022-04-11 08:13:21 +02:00
Daimona Eaytoy 59eb3b70fb Inject dependencies into the authentication provider
- Define it with the extension.json key, instead of using the
  registration callback
- Inject the services it needs
- Replace direct User instantiation with UserFactory
- Move log subtypes to extension.json as well

Change-Id: I86a761c7fa844b1f417b974798373622a15f6411
2022-04-09 18:44:25 +02:00
Translation updater bot 821b58fe94 Localisation updates from https://translatewiki.net.
Change-Id: I904a70c4673c1b1b83164faec1bfbe5bec151444
2022-04-08 08:26:33 +02:00
Translation updater bot ecc6ee295b Localisation updates from https://translatewiki.net.
Change-Id: I070ca68ab0686bded168183d9a4093fcb64e09ed
2022-04-07 08:08:45 +02:00
jenkins-bot c7903f9a7c Merge "Fix check for null Content in getEditTextForFiltering" 2022-04-06 17:40:31 +00:00
Translation updater bot 932689ca5d Localisation updates from https://translatewiki.net.
Change-Id: I3b8839cbd97d4ef9bd0838bc2c691153b36fa0d0
2022-04-06 08:26:20 +02:00
Translation updater bot 065b4dfa6b Localisation updates from https://translatewiki.net.
Change-Id: Iaebbba4a4c447033033556219c7c401d1d948dfc
2022-04-05 08:24:38 +02:00
jenkins-bot 23981a5900 Merge "Localisation updates from https://translatewiki.net." 2022-04-04 07:37:56 +00:00
Translation updater bot 733992d73a Localisation updates from https://translatewiki.net.
Change-Id: I841cf708e9debec960a12a2915ec60e416cfdca6
2022-04-04 09:33:33 +02:00
Translation updater bot 354cb06634 Localisation updates from https://translatewiki.net.
Change-Id: Ib17bad7bd065e7c27e8725f1d5f12cfa89e8960d
2022-04-04 09:12:57 +02:00
gerritbot 8e55018613 Fix usage of ApiBase::PARAM_* deprecated constants
The ones that are replaced with ParamValidator

Bug: T275455
Change-Id: If1fbef4707eecd7a6bfa5947614fe46d70c62dd6
2022-04-04 00:49:37 +00:00
gerritbot a617a846f0 Replace deprecated ApiBase::PARAM_ with IntegerDef ones
The rest of ApiBase::PARAM_  will be done in separate patches

Bug: T275455
Change-Id: I1c836d2d85e3004e8b6b1a53e11770910acc0616
2022-04-03 22:13:20 +02:00
Matěj Suchánek 58dfab4aeb Fix check for null Content in getEditTextForFiltering
The check was not consistent and the code could still crash
when $oldContent was null. RevisionRecord:getContent only
returns null when audience check fails, but we don't ask
for that.

Change-Id: Id64646a6762167f552e104f623130bedc6b2dd18
2022-04-03 13:06:24 +02:00
Translation updater bot cdc6aba3f8 Localisation updates from https://translatewiki.net.
Change-Id: I13dad966fee76eee5a426a472d6e5e375f32ef7d
2022-04-01 08:25:28 +02:00
Translation updater bot f2eec6f2db Localisation updates from https://translatewiki.net.
Change-Id: I88014530044224d2f7f1b45a7dd9ddb04f648bbb
2022-03-31 08:35:12 +02:00
jenkins-bot 59def97891 Merge "Use RestrictionStore instead of deprecated method" 2022-03-30 09:59:35 +00:00
Matěj Suchánek 686d7ea88c Use RestrictionStore instead of deprecated method
Also restructure the unit test a bit.

Change-Id: If5ce26f1bc4efdb29653aed3fc47335dddc1e44c
2022-03-29 16:11:55 +02:00
Translation updater bot 20b379f198 Localisation updates from https://translatewiki.net.
Change-Id: I2fbdcc9253dbd5e70e10e0ed151e8343d6830f16
2022-03-29 08:05:09 +02:00
Translation updater bot 0a9520755c Localisation updates from https://translatewiki.net.
Change-Id: I69c5d14a4133a8316011098ba04320713a43b85a
2022-03-28 08:19:29 +02:00
jenkins-bot 50311e750d Merge "Remove SpecialAbuseLog::isHidden" 2022-03-27 18:27:05 +00:00
Func 24f5ca6e2d Use setTitle() instead of setAction() where posible
The getLocalURL() method can return url with query string when
wgArticlePath is configured to do so, and query string of GET form
would be ignored by browsers.
The setAction() method is problematic (T285464 and above) and hard to
warn the wrong usage. I'm going to go through and fix every use case,
and finally deprecate it.

Change-Id: I66b634f0cc996be3d7048d410b46fe77c88f9879
2022-03-27 21:06:38 +08:00
jenkins-bot bd309bb220 Merge "Clean up test files" 2022-03-25 21:28:10 +00:00
Daimona Eaytoy 773d553c8e Remove SpecialAbuseLog::isHidden
This is a breaking change for the API: 'hidden' is now either true or
false, depending on afl_deleted. 'implicit' is no longer a possible
value, the caller should compute it instead if necessary.

Then simplify the remaining usage of isHidden, using a temporary private
method.

Bug: T291718
Change-Id: I97b5195d306c35ddca3f071d9ff4d896f9fd5c8d
2022-03-25 21:22:59 +00:00
Translation updater bot 4055aa0b01 Localisation updates from https://translatewiki.net.
Change-Id: I088cf5cbfc55ae13960b76e14c7dac07887426df
2022-03-25 08:34:18 +01:00
Translation updater bot cbd29a5ef5 Localisation updates from https://translatewiki.net.
Change-Id: I02c108628a0bfa2744daa1f8aa06aa3d4c8ece84
2022-03-24 08:33:30 +01:00
jenkins-bot def507f6d3 Merge "Refactor ConsequencesExecutor to process consequences in more steps" 2022-03-23 09:06:55 +00:00
Translation updater bot 5e7cfb1de7 Localisation updates from https://translatewiki.net.
Change-Id: I907ae7ae8433e9c55d6c9c33e3258b5e5b64a8f8
2022-03-23 08:24:55 +01:00
Translation updater bot 5ea3c5aa5d Localisation updates from https://translatewiki.net.
Change-Id: Id14453cfe95d96b79a7ab87ddf4643fd92fa2ed3
2022-03-22 08:28:27 +01:00
jenkins-bot 84f9e2a6d2 Merge "Replace (error|warning|success)box in test cases of AbuseFilter" 2022-03-21 12:09:29 +00:00
Translation updater bot b973953982 Localisation updates from https://translatewiki.net.
Change-Id: I2bc6d881120e6c187dd6628c207ca8b70a8bffb0
2022-03-21 08:13:53 +01:00
stang f20699935a Replace (error|warning|success)box in test cases of AbuseFilter
Bug: T304243
Change-Id: Iae2b968fc4c84bf360489ec8ff3491afd476c898
2022-03-20 20:16:31 +00:00
Daimona Eaytoy 8ee9a21750 Clean up test files
Convert a few integration tests to unit tests now that it's possible,
split the AbuseFilterSaveTest file into three different classes.

Change-Id: Ia2c0d7ab878b20a89324336a532abdc44f1e6b74
2022-03-20 17:40:49 +00:00
jenkins-bot 080817c48a Merge "ViewRevert: Adjust use cases of HTMLForm" 2022-03-20 17:35:18 +00:00
jenkins-bot 9ad2b9440e Merge "build: Update linters" 2022-03-20 15:28:34 +00:00
Func 3ff1a7f34d ViewRevert: Adjust use cases of HTMLForm
Use setTitle() instead of setAction(), T285464.

HTMLForm would set edit token for post form, use setTokenSalt() to amend.

HTMLForm would fetch user input value from the request itself, since
the two form shared the same field name, the 'default' params assigned
are unfunctional.

HTMLForm would prefix descriptor keys with 'wp' as the default name
of generated input fields, make use of this feature.

Bug: T285464
Change-Id: I2cc3c1d042998b65df5ee51f0715fe25a5e18e72
2022-03-20 23:28:06 +08:00
Daimona Eaytoy 2de5fce177 Refactor ConsequencesExecutor to process consequences in more steps
Introduce shorter methods, one for each steps, so that it's easier to
understand what the code is doing and figure out if the order makes
sense. The ConsequencesExecutor test is now a proper unit test. Also
simplify AbuseFilterConsequencesTest, removing old/wrong logic and
fixing two expected values that were actually wrong (but worked because
of the aforementioned wrong logic).

The only functional changes should be:
 - We pick the longest block *after* checking the ConsequenceDisabler
   consequences, so e.g. if a filter has a long block + warn and another
   filter has a shorter block, we still keep the second one if warn will
   disable the block.
 - Remove disallow in presence of dangerous actions after checking
   ConsequenceDisabler's and deduplicating blocks. Otherwise we may
   remove disallow for filters where block (etc.) doesn't end up being
   disabled. We may also want to consider not removing disallow at all,
   now that messages are customizable.

Bug: T303059
Change-Id: If00adbf2056758222eaaea70b16d3b4f89502c20
2022-03-19 15:49:36 +00:00
Translation updater bot 1d6d3f4894 Localisation updates from https://translatewiki.net.
Change-Id: Ie12e68464ba46f7dcd030f8203cd3a2e34f8b98a
2022-03-18 08:44:11 +01:00
Ed Sanders 3892280f1d build: Update linters
Change-Id: Icc5076d5cf757e7e70511c2b75a82b0a45cb47c9
2022-03-17 22:19:08 +00:00
Translation updater bot 0e5f0d7aad Localisation updates from https://translatewiki.net.
Change-Id: If2ab3ffa29131571b64dd7226e5eb8c052fad079
2022-03-17 08:36:21 +01:00
Translation updater bot 2b61a07078 Localisation updates from https://translatewiki.net.
Change-Id: Id9a7d8be47edfefd6cd28f7ed2f30127eb7022b1
2022-03-16 08:07:06 +01:00
Translation updater bot d11bb13577 Localisation updates from https://translatewiki.net.
Change-Id: I298d997aba9b1602f0758c9dcf2978684f47b261
2022-03-15 08:24:31 +01:00
Translation updater bot d26a84e52f Localisation updates from https://translatewiki.net.
Change-Id: Id8c01ead8de70e5afd2408a1644fdc562e3816c2
2022-03-14 08:13:16 +01:00
jenkins-bot 1e105c8821 Merge "Cast filter id to integer in AbuseLogPrivateDetails output" 2022-03-12 17:22:55 +00:00
Matěj Suchánek 7232bfc647 Cast filter id to integer in AbuseLogPrivateDetails output
Change-Id: If4a1bf4181e3a84281299bf4aa66fd314100f3dc
2022-03-12 12:37:47 +01:00
Matěj Suchánek 222aebab91 QueryAbuseLog: Cast revision id to integer
Change-Id: Id670a1cd7e3695211b202dba45b60c9f9c69649e
2022-03-12 01:19:56 +00:00
Translation updater bot deb9886302 Localisation updates from https://translatewiki.net.
Change-Id: I7c7a3fdfc11d3b043de9bbaa13053c6c7dd86b01
2022-03-11 08:31:32 +01:00
Translation updater bot 70a910e22a Localisation updates from https://translatewiki.net.
Change-Id: Ie6b9b0d95ae7c93d1edff6cd432d24b852c85484
2022-03-10 08:18:27 +01:00