Commit graph

7570 commits

Author SHA1 Message Date
Translation updater bot
142595c9b0 Localisation updates from https://translatewiki.net.
Change-Id: I0a1854a11d232f940a85b3a3a6d44f2887c9422d
2022-03-17 08:13:09 +01:00
jenkins-bot
30b8cff7f2 Merge "Use badfilecontexttitle to set targetlang for imageinfo requests" 2022-03-17 02:07:44 +00:00
Func
7be2e3e38d ApiEmailUser: Mark the subject as a required parameter
This matches the behavior of Special:EmailUser.

Bug: T303862
Change-Id: I445a9388a573383ffbbe451be1f925045d15a556
2022-03-16 11:33:29 +00:00
jenkins-bot
0a401b6ac6 Merge "Try to ensure tags are arrays" 2022-03-16 04:20:36 +00:00
Umherirrender
2ce35ff185 api: Get all services for ApiPageSet in constructor
build: Removes phan suppresses due to changed parse order of phan-taint

Bug: T283314
Change-Id: I616d1f8f62225210566d0ea5b9cc295fdc3e54fb
2022-03-15 21:38:34 +00:00
Arlo Breault
2f39231f64 Use badfilecontexttitle to set targetlang for imageinfo requests
Parser::makeImage always sets targetlang based on the page language.  In
order for Parsoid to support that in standalone mode, we set it based on
the overloaded badfilecontexttitle, which is the only context we have
when making imageinfo requests.

Follow up to I348840ef405e1370cc0c17d69051bce30153c9c0

Bug: T208620
Change-Id: Id01b84907c6817194c53dbb9d731e5383e7a0056
2022-03-15 12:03:45 -04:00
Translation updater bot
c9be404f86 Localisation updates from https://translatewiki.net.
Change-Id: I8f1dc53cbbbd8158fd71f573fb1dd680ce83fb20
2022-03-15 08:12:47 +01:00
jenkins-bot
1f1bba9590 Merge "api: Avoid fatal if movetalk is requested for namespace without talk" 2022-03-13 20:26:49 +00:00
jenkins-bot
6fd4c95f5e Merge "Use updated ObjectFactory namespace" 2022-03-12 00:19:53 +00:00
jenkins-bot
85c43c06bc Merge "Export ParserOutput strategy keys for jsConfigVars" 2022-03-11 22:36:10 +00:00
Translation updater bot
b2ab37286a Localisation updates from https://translatewiki.net.
Change-Id: I61cbdd8370036cfaf1d6478a223d7f3efe13f507
2022-03-11 08:10:37 +01:00
jenkins-bot
6be43019d9 Merge "Re-apply "preferences: Use a faster and simpler form descriptor when validating"" 2022-03-10 23:17:32 +00:00
Func
ab3ff34c47 Re-apply "preferences: Use a faster and simpler form descriptor when validating"
Previously attempted in 07b4daf85d,
reverted in 8763d8e911.

Message parsing used to be the biggest part of loads during
DefaultPreferencesFactory::loadPreferenceValues(), since it need to
load form fields to validate existing user preferences.

Message names in form descriptor can be unset as much as possible,
but special cases should be carefully handled.

The attempt of loading value for info fields is skipped to avoid
issues described in T302643.

Bug: T58633
Bug: T302643
Change-Id: I05dcfd60d4103b447dea71851b8e4db9a5d0e1e6
2022-03-10 23:00:53 +00:00
Translation updater bot
da7bb46849 Localisation updates from https://translatewiki.net.
Change-Id: I8c84bcb268fb12be71f726ee27bdf4b9bf2829e6
2022-03-10 07:54:21 +01:00
Alexander Vorwerk
9b09bf3112 Use updated ObjectFactory namespace
Depends-On: I99c5e5664d2401c36a9890f148eba7c25e6e8324
Depends-On: I48ab818b2965da14af15ef370aa83ad9455badd9
Depends-On: I018371e4b77911e56152ca7b2df734afc73f58a5
Change-Id: I04ebdb52102f6191d49a9cc70b1f98308299e72f
2022-03-09 23:04:51 +00:00
C. Scott Ananian
a3000c2972 Export ParserOutput strategy keys for jsConfigVars
This allows Parsoid to properly merge jsconfigvars via the external API
(ie, when Parsoid is run in 'standalone mode') when an extension uses
the new-in-1.38 ParserOutput::appendJsConfigVar() method.

Change-Id: I974d9ecfb4ca8b22361d25c4c70fc5e55c39d5ed
2022-03-09 17:42:00 -05:00
jenkins-bot
96393c492e Merge "Add various fallback values for null return values" 2022-03-09 22:32:29 +00:00
jenkins-bot
e31b1fbe20 Merge "interwiki: Adjust documentation for InterwikiLookup::getAllPrefixes" 2022-03-09 22:28:04 +00:00
Umherirrender
19925ef026 Add various fallback values for null return values
Found by phan strict checks

Change-Id: I83187b5fd25b015d2c75e22d4b5202803653d743
2022-03-09 20:15:36 +01:00
Translation updater bot
eaaa1fbbd9 Localisation updates from https://translatewiki.net.
Change-Id: Ibbeb83ee7aee6c066ef14e8e00a263eef2b4bb40
2022-03-09 07:57:53 +01:00
Arlo Breault
58f7e36f63 Try to ensure tags are arrays
In a similar vein to I46033d5ddda055c275dbda71d5c38c4a7a858c9d

The documentation to WikiPage::doUpdateRestrictions is changed to remove
`|string|null`.  ManualLogEntry::addTags can handle a string but it's
unexpected in the RevisionFromEditComplete hook.  From codesearch,
ApiProtect is the only caller passing in $tags, and that's coming from
a PARAM_ISMULTI, which presumably can only be an array or null.

Bug: T302918
Change-Id: Icd8a7391f7a8c21b0cdb1f734e65ee5661c1075f
2022-03-04 19:07:30 -05:00
daniel
cf581bb2ca Define MW_INSTALL_PATH constant and BaseDirectory config.
Application logic should use the BaseDirectory config variable.
Framework code should use MW_INSTALL_PATH to locate files should.

NOTE: Update https://www.mediawiki.org/wiki/Manual:$IP

Bug: T300301
Depends-On: I7142af16d692f26e90673b058029f572c1ea3991
Change-Id: Ib4caa80bb7007c4c7960a2fd370cf5da7d9ba344
2022-03-04 14:18:27 +01:00
Ammarpad
b24332fbcc ApiUpload: Pass empty tags as empty array instead of null
If no tags are specified, null shouldn't be passed as it may
cause problems down the stack

Bug: T302918
Change-Id: I46033d5ddda055c275dbda71d5c38c4a7a858c9d
2022-03-03 12:29:01 +01:00
Translation updater bot
e4c98af401 Localisation updates from https://translatewiki.net.
Change-Id: Ib334a71521339ddffeb758a7898d8a6ef6055b04
2022-03-03 08:06:45 +01:00
jenkins-bot
38d3b3f5b7 Merge "Revert "preferences: Use a faster and simpler form descriptor when validating"" 2022-03-01 19:53:21 +00:00
Krinkle
8763d8e911 Revert "preferences: Use a faster and simpler form descriptor when validating"
This reverts commit 07b4daf85d.

Due to the new method being used in both the API, and in the
loadPreferenceValues method (which is used by the main pref UI), this
change is not easy to reason about and is much wider in impact than
I had thought. More research and understanding is needed.

Bug: T302643
Change-Id: Ic420bc16ac5de8ce90343926e9c73815f3ff7479
2022-03-01 19:33:30 +00:00
Translation updater bot
1b85fa89a3 Localisation updates from https://translatewiki.net.
Change-Id: Icdacc2082821b2f6bddf00f0602e3d10c2928ccf
2022-03-01 14:20:45 +01:00
Translation updater bot
88b7ef212e Localisation updates from https://translatewiki.net.
Change-Id: I4ffed413b9a1c1197c5aabf6f5664e8fbd1280ff
2022-02-28 08:28:51 +01:00
Translation updater bot
392781c2ac Localisation updates from https://translatewiki.net.
Change-Id: I2f13b31c2d1654c7d582ec8188b9d04ff623feee
2022-02-25 09:21:55 +01:00
Reedy
86934b2fa8 Replace some more usages of Wikimedia\(suppress|restore)Warnings()
Change-Id: I2eb133a9e32116cd155f59086245bc4d15ecbfcc
2022-02-24 20:27:46 +00:00
jenkins-bot
99e1b7312e Merge "preferences: Use a faster and simpler form descriptor when validating" 2022-02-24 19:16:34 +00:00
Func
07b4daf85d preferences: Use a faster and simpler form descriptor when validating
Message parsing used to be the biggest part of loads during
DefaultPreferencesFactory::loadPreferenceValues(), since it need to
load form fields to validate existing user preferences.

Message names in form descriptor can be unset as much as possible,
but special cases should be carefully handled.

Bug: T58633
Change-Id: I1b5c2331e6d5a63f296b4147a91aecb39abf3530
2022-02-24 18:16:43 +00:00
jenkins-bot
dc9d030453 Merge "api: Fix documenation/types related to null and int types" 2022-02-24 18:09:06 +00:00
Umherirrender
6a3cdd15e1 api: Fix documenation/types related to null and int types
Found by phan strict checks

Change-Id: I2b2ae12ca39d67140f0f3c1cc5066c8ef72716de
2022-02-24 17:16:36 +00:00
Umherirrender
e0c3e75414 interwiki: Adjust documentation for InterwikiLookup::getAllPrefixes
Use bool instead of string, most caller provided int instead.

The InterwikiLookupAdapter class is strict comparing Interwiki::isLocal
(a bool) with the given $local value, which evaluates always to false
and the expected filter option is not working.
The unit tests is using bool, not the documented string.

The ClassicInterwikiLookup is not affected.

Found by phan strict checks

Change-Id: I63ed9772429c6f5bfe38a9fad190491812866f3f
2022-02-24 17:08:29 +00:00
Translation updater bot
4a373f6986 Localisation updates from https://translatewiki.net.
Change-Id: Idf4287d9d50e1eea7fe59601f13bb95c82ad2450
2022-02-24 08:23:08 +01:00
jenkins-bot
2e70057dc8 Merge "api: Remove ApiQueryBlocks::prepareUsername" 2022-02-24 06:38:24 +00:00
jenkins-bot
8fd4a02966 Merge "ApiDelete: add option to delete associated talk page" 2022-02-23 19:55:24 +00:00
Translation updater bot
e034ac26db Localisation updates from https://translatewiki.net.
Change-Id: I612251e13a12160f7b0177c140d53e95320a46ae
2022-02-23 08:06:26 +01:00
Dayllan Maza
bfdfb77094 ApiDelete: add option to delete associated talk page
This works thanks to the new "deletetalk" parameter (the name is
consistent with "movetalk" to ApiMove). The API will return with a
warning if the page is already a talk page, or if the talk page
doesn't exist.

Note that the API response doesn't expose information about the talk
page deletion. This would likely be a breaking change to the module, and
is also not too easy to implement until FileDeleteForm is refactored as
well.

Bug: T263209
Change-Id: I30f2da190433a3ef9c0ac375f23b68acd3d6f190
2022-02-22 10:58:26 -05:00
Translation updater bot
aeea3a582e Localisation updates from https://translatewiki.net.
Change-Id: I9beb3706aec691fb87c83d4d83a51eeb4344b4fc
2022-02-22 14:11:16 +01:00
Translation updater bot
2b5aca726d Localisation updates from https://translatewiki.net.
Change-Id: I48c17062ed3b1fcdd256fa827a05b27f7a8b6351
2022-02-22 07:57:22 +01:00
jenkins-bot
a953d231d8 Merge "ApiSandbox: Fix case and styling of param flags" 2022-02-21 16:21:30 +00:00
Ed Sanders
fc3624562e ApiSandbox: Fix case and styling of param flags
* Use lower case without a full stop
* Use standard muted colour for secondary information. The
  red warning colour is still used on the param page itself.

Change-Id: I734a2f31f9139b8415bd61dcbe0561232e2632ee
2022-02-21 12:50:53 +00:00
Translation updater bot
82d4dab9a3 Localisation updates from https://translatewiki.net.
Change-Id: I83e0c5453a543db25b0c448f442d6f98f7f2234f
2022-02-21 07:59:34 +01:00
Umherirrender
e37d3d84b6 api: Remove ApiQueryBlocks::prepareUsername
The parameter is using the UserDef validation,
which provides all this features

Also all params are guarded to be set in the $params array after
extractRequestParams(), no need to use isset on $params.
Make explicit that empty bkusers= or bkids= are ignored,
instead using the implicit check in addWhereFld.
Doing nothing when requesting nothing would be a breaking change.

Change-Id: I3602412874b1b3a954037d95ad7cefbe865e3893
2022-02-19 14:42:04 +01:00
Umherirrender
06ddf56c5a api: Avoid fatal if movetalk is requested for namespace without talk
In that case the variable $toTalk is null,
but that is not allow for the moveSubpages() function

Found by phan strict checks

Change-Id: Ib1f67247277f44dc8c9b08eb5a287c701f45f918
2022-02-19 12:14:45 +01:00
Umherirrender
7116b4661e api: Check possible null on TitleFactory::makeTitleSafe for incontinue=
Can result in fatal error, because Title::compare does not take null

Change-Id: Ib08c237fcebc7514f1945030a35044e441029a8b
2022-02-19 00:08:06 +01:00
Ed Sanders
1384dfaa65 ApiParse: Note that setting useskin might affect text content
This has been the case since I5b41251ad95ea.

Change-Id: I83b679c70ddea337dfe5b621d7f003f1e0a3672c
2022-02-18 15:45:38 +00:00
jenkins-bot
10755a3b7e Merge "Simplify ApiUserrights now that CentralAuth no longer extends it" 2022-02-18 14:46:38 +00:00