Commit graph

7487 commits

Author SHA1 Message Date
Translation updater bot
6141f71df3 Localisation updates from https://translatewiki.net.
Change-Id: I659b457a687fdec1e4f6dde9f7e8553220e6aac1
2022-01-21 07:19:57 +00:00
Translation updater bot
28664da30f Localisation updates from https://translatewiki.net.
Change-Id: I71f6b8d3f4c64a9319e9602a711d1f6027258d8c
2022-01-20 09:02:30 +01:00
Translation updater bot
71c90ecb89 Localisation updates from https://translatewiki.net.
Change-Id: I92520aa8893ab8f7959f5d5667b8f9ac8044ede8
2022-01-17 07:58:26 +01:00
jenkins-bot
f588b107e5 Merge "Cast user recentactions param type to integer for ApiQueryAllUsers with activeusers=1." 2022-01-16 20:13:20 +00:00
TChin
47adb6d65a Refactor global variables to use MediaWikiServices instead
Automatically refactors wg prefixed globals to use MediaWikiServices config using Rector. Doesn't include files that set globals or files that fail CI.

Rector Gist: https://gist.github.com/tchin25/7cc54f6d23aedef010b22e4dfbead228

* This patch uses a modified source code rector library for our specific use case and the rector will have different effects without it.

A writeup for future reference is here: https://meta.wikimedia.org/wiki/User:TChin_(WMF)/Using_Rector_On_MediaWiki

Change-Id: I1a691f01cd82e60bf41207d32501edb4b9835e37
2022-01-10 13:55:53 -05:00
Translation updater bot
a18d265568 Localisation updates from https://translatewiki.net.
Change-Id: Ib0e6b249d8ff84b1425a5fa4d7e29c987aa81b8a
2022-01-05 08:06:02 +01:00
Translation updater bot
ad33ac6428 Localisation updates from https://translatewiki.net.
Change-Id: I5416622371e586535bcf91779b33e8e502992b25
2022-01-03 08:00:42 +01:00
Siddharth VP
60faebb725 Fix typos in comments (I-J)
Change-Id: Icaea2b6665cfc3b811d94f70c93452237f5e72bf
2021-12-30 20:38:04 +05:30
jenkins-bot
e31bd424cb Merge "Fix typos in comments (A-B)" 2021-12-30 14:42:50 +00:00
Translation updater bot
2518706eae Localisation updates from https://translatewiki.net.
Change-Id: I76db0802e7a47e03ed8fa9a98abf4f0dbd44d944
2021-12-30 09:25:48 +01:00
Translation updater bot
96ab2f99a5 Localisation updates from https://translatewiki.net.
Change-Id: I44c8d0ba288f1664de5c187c987eb2e4c7e84dab
2021-12-29 09:32:44 +01:00
Translation updater bot
57e7c71e84 Localisation updates from https://translatewiki.net.
Change-Id: I877833e56a21ab092f6f48f1e702b87d3753f6b8
2021-12-27 09:19:06 +01:00
Siddharth VP
0d9b49beff Fix typos in comments (A-B)
Change-Id: I852453fbeeebdc4e34c0b35c0fdca4b4ab74fde9
2021-12-26 16:43:47 +05:30
Translation updater bot
8a5d31745d Localisation updates from https://translatewiki.net.
Change-Id: I662b41244d2967b0e912b244fb5868206ad0299a
2021-12-21 08:01:08 +01:00
jenkins-bot
a09e60d0c3 Merge "Introduced PreparedUpdate to replace PreparedEdit" 2021-12-20 20:41:14 +00:00
daniel
cbfcf9e8a8 Introduced PreparedUpdate to replace PreparedEdit
PreparedUpdate represents an in-progress edit. It can be used to access
information about the edit from hooks that do to have access to the
PageUpdater. Ideally, the PreparedUpdate or PageUpdater would be passed
to the hook as a parameter. Handlers of legacy hooks may use
WikiPage::prepareUpdate() to access it.

Bug: T242249
Needed-By: I23324a31e06e7e6f28077085c0ade05db63e9a35
Change-Id: Id5ba40a21cc4547205adf2f3a1f725c3a69c24d8
2021-12-20 21:19:52 +01:00
Translation updater bot
181bebc58f Localisation updates from https://translatewiki.net.
Change-Id: Ie6372bf40b18d9e446adb8676ef648ec1ef83839
2021-12-20 08:08:34 +01:00
jenkins-bot
ba642700e6 Merge "Edits via API should set cookie for anons" 2021-12-18 07:29:20 +00:00
jenkins-bot
1d6a178106 Merge "Allow retrieval of tokens of all available types in one request" 2021-12-18 05:49:34 +00:00
jdlrobson
3869cc522b Edits via API should set cookie for anons
Bug: T295910
Change-Id: Ice45db0cb685439603c676f790a146e7e5bb50df
2021-12-17 18:09:36 +00:00
jenkins-bot
0656d50ea7 Merge "ApiBlockInfoTrait: Add formatted and relative times" 2021-12-16 16:04:06 +00:00
Amir Sarabadani
627c1c2c30 Allow setting max execution time to several special pages
These special pages and their counter-part APIs are:
 - Special:RecentChanges
 - Special:Watchlist
 - Special:Log
 - Special:Contributions

This also changes the way MAX_EXECUTION_TIME works from taking the value
as milliseconds, it takes seconds which is more intuitive for users.

Bug: T297708
Depends-On: I126e7181422d8da1a63afc3717faa4f72a687dd9
Change-Id: I3ff78751c3df3b6342f1865d35c2075f4415185d
2021-12-15 22:59:06 +01:00
jenkins-bot
7032a10719 Merge "Remove some more comments that literally repeat the code" 2021-12-13 20:13:26 +00:00
Translation updater bot
4e43885ccb Localisation updates from https://translatewiki.net.
Change-Id: I6aca0d11cf0ed6b86de67d22b9fdef27c39b074c
2021-12-13 08:08:38 +01:00
Translation updater bot
8aa397b5f1 Localisation updates from https://translatewiki.net.
Change-Id: I172caa73dd4f88bd64c99b6461dce202d8cb8ae7
2021-12-10 09:08:16 +01:00
Thiemo Kreuz
b4c63c64ae Remove some more comments that literally repeat the code
Nothing to learn from these.

You can find a longer explanation in the comments in I93751e6.

Change-Id: I195aae70fc282b58be5b18160783f27d38605d15
2021-12-09 19:01:36 +01:00
jenkins-bot
b085cd60cf Merge "Change return format of DeletePage again" 2021-12-06 22:20:15 +00:00
Ed Sanders
c0ecb08bdb ApiBlockInfoTrait: Add formatted and relative times
Providing just standard timestamps means that formatting
has to happen in the client, however that means loading a
large deprecated library (moment.js). We already have
localised formatting functions in PHP so just provide
the output of those in the API.

Also fix test mocks to correctly provide a language object
rather than a string.

Bug: T224635
Change-Id: I73dcfcdbbc6e90bc692bf5a456075fe1eaed2df9
2021-12-06 16:02:18 +00:00
Translation updater bot
7b0576daf0 Localisation updates from https://translatewiki.net.
Change-Id: I7c85436ce50d68c67b7606a3f8d5461f00b0e008
2021-12-06 08:01:26 +01:00
Alexander Vorwerk
3aa5b6643b Use LanguageNameUtils constants instead of strings
Change-Id: I8521d00675008da0d7c8c768ab75352212653c66
2021-12-05 22:13:34 +01:00
Umherirrender
3f08cd753a Replace deprecated Language::fetchLanguageNames
Change-Id: Iecd5481edb4dae6c7911157e24c32a51f4438ab2
2021-12-05 21:11:49 +01:00
jenkins-bot
3a0bdedbcf Merge "Use inject Config in api modules and special pages" 2021-12-03 15:23:15 +00:00
Thiemo Kreuz
0c5802ec4e Use PHP's [ $this, 'fn' ] callback syntax where possible
PHP 8.1 will give us "first class callables" that look like e.g.

 $result = array_map( $this->fn(...), $array );

For now we can use

 $result = array_map( [ $this, 'fn' ], $array );

Change-Id: I7278c80c075d162da73aa45af1b6578310ce0624
2021-12-03 09:08:57 +01:00
Translation updater bot
2682461394 Localisation updates from https://translatewiki.net.
Change-Id: I61bcc53970621c7d58bbbcf729002958c5e26e8f
2021-12-02 08:22:01 +01:00
Derick Alangi
8fe9e0317f Introduce Redirect(Lookup&Store) services to handle redirects
The concept of a redirect chain didn't really work for a value of
max redirect > 1. In the ideal world, we just want to have a source
which points to target (source -> target) discarding the concept of
a redirect chain completely.

Having something like: source -> target -> target1 -> target2 doesn't
really work well with the current database design.

NOTE: Support for $wgMaxRedirect will be removed soon hence
deprecation without interfaces for replacement.

Bug: T290639
Change-Id: I469de6f85e405e8ddbe7abaa5b99b77cb9cf415d
2021-12-01 19:14:22 +01:00
Amir Sarabadani
3cacc7f9c3 Fix local rendering of link in diff view with action=render
We probably should move Linker::expandLocalLinks( $text ) somewhere
better.

Bug: T263581
Change-Id: Iac446e761a709b6ceff5bd83dfa9a80db50a08d5
2021-12-01 17:18:53 +01:00
Alexander Vorwerk
e73e07e85b Use inject Config in api modules and special pages
Replacing the usage of global vars with the usage of the injected
Config instance.

Change-Id: I90612b4dde9b76afb1bac4855274c03dcaf23044
2021-12-01 13:01:02 +00:00
Daimona Eaytoy
0e558da7b8 Change return format of DeletePage again
In retrospect, I rushed the previous patch: we really need a way to tell
which deletion an ID belong to (and whether it was scheduled). So make
both result getters return an array with known keys that can be used
programmatically. Right now the class can only delete a single page, and
thus there's a single constant and this change is effectively a noop.

The deletionWasScheduled() method, introduced in 1.37, was
hard-deprecated out of an abundance of caution. There are no known uses
on codesearch, so it can probably just be removed in the next release.

Also reorder constructor params to DeletePage -- BacklinkCacheFactory is
a service injected by the factory, hence it shouldn't be grouped
together with value objects injected by the caller.

Change-Id: I32679b7cacc638ec3e9dc5b8dfe9bcc794b22ecf
2021-11-29 15:09:42 +00:00
Translation updater bot
675fc21afa Localisation updates from https://translatewiki.net.
Change-Id: Ie462c3c78576eb5576499966ae08a2b1a48f512c
2021-11-29 07:55:55 +01:00
Translation updater bot
af196c9156 Localisation updates from https://translatewiki.net.
Change-Id: I54371a39a2256a942b5e8136402efebb0fb733aa
2021-11-26 08:04:05 +01:00
Translation updater bot
e517052a13 Localisation updates from https://translatewiki.net.
Change-Id: I748c15eda4c81cc646f3c50c076882cd382a97b9
2021-11-25 08:06:19 +01:00
Translation updater bot
ffc20ef217 Localisation updates from https://translatewiki.net.
Change-Id: I19c49104203db62869760d08a1ad13d44b26ce28
2021-11-24 08:03:47 +01:00
jenkins-bot
c9ec808467 Merge "Expose existing 'variant' API parameter" 2021-11-23 10:42:22 +00:00
jenkins-bot
3690fb0f5d Merge "Use DeletePage in FileDeleteForm and fix output of ApiDelete" 2021-11-23 09:55:55 +00:00
Reedy
2a2bb1e9bd Remove or replace usages of "sane"
Bug: T254646
Change-Id: I096b2cf738a1395a14f1d47bcbed0c2c686c2581
2021-11-22 13:35:17 +00:00
Translation updater bot
ee541d768d Localisation updates from https://translatewiki.net.
Change-Id: I651163ff3b3b7341f92b6dc5103349ffc4c31c2b
2021-11-22 08:47:02 +01:00
Sam Wilson
3cb5117116 Expose existing 'variant' API parameter
The 'variant' parameter exists and functions, but was not yet
documented.

Bug: T117549
Change-Id: Ib7347f7c6fbffd4c0cbb378a14a0166da6b3d39c
2021-11-22 11:34:41 +08:00
Reedy
7bf779524a Remove or replace usages of "sanity"
Bug: T254646
Change-Id: I2b120f0b9c9e1dc1a6c216bfefa3f2463efe1001
2021-11-19 23:19:42 +00:00
Translation updater bot
1485a1087e Localisation updates from https://translatewiki.net.
Change-Id: I8441b104c2cccf8340eae78658103b10a14e177b
2021-11-19 08:02:31 +01:00
Translation updater bot
44ea3e68f1 Localisation updates from https://translatewiki.net.
Change-Id: I76041e013e105822e042779f30609fe1ba9b593a
2021-11-18 08:26:13 +01:00