Commit graph

5992 commits

Author SHA1 Message Date
Aaron Schulz
cb15755e92 Normalize use of "INNER JOIN" to "JOIN" in database queries
The ANSI SQL default join type is INNER and this might save
some line breaks here and there.

Change-Id: Ibd39976f46ca3f9b71190d3b60b76ca085787a00
2019-03-06 09:17:30 -08:00
Brad Jorsch
0ccc692012 API: Avoid duplicate logs to api-feature-usage
It can wind up logging deprecations twice if extractRequestParams() is
called with different values for 'parseLimit', for example.

Change-Id: I921777089fb8cfb4339af6fd08ee3475ed31b7f6
2019-03-05 17:56:55 -05:00
jenkins-bot
309c7b316f Merge "resourceloader: Remove addModuleScripts, and deprecate getModuleScripts." 2019-03-05 18:54:38 +00:00
Timo Tijhof
c6f3440832 resourceloader: Remove addModuleScripts, and deprecate getModuleScripts.
The addModuleScripts() methods were deprecated in 1.31 and 1.32,
these are now removed.

The getModuleScripts() are now deprecated as well, always returning
an empty array. To be removed in 1.34.

Depends on commits for bundled/wmf-deployed extensions that
remove the last few remaining callers to the deprecated functions
in: 3D, Collection, Flow, GlobalUserPage, and Wikibase.

Bug: T188689
Depends-On: If9f0bc6aef85117587fa1929f34f8861c8d80314
Depends-On: Ia8d41b97fbf6822f5f8f7ac889408acce1ac9a3a
Depends-On: I503b919739ea474ff33726815b0da55e2f7e2724
Depends-On: I236ef637fd03b810a46eb361e25067a037e9d183
Depends-On: I62e17779753b977a452cc0c9694947941e999cc3
Change-Id: I5a19b8f164ccf666485d2971202194b747f882df
2019-03-05 16:54:08 +00:00
Ottomata
ca3ff24560 Merge "Set api-request log http.request_headers properly" 2019-03-04 21:41:55 +00:00
Andrew Otto
e453a7b33f Set api-request log http.request_headers properly
$request->getHeader( 'Api-user-agent' ) was returning false,
and we can only accept string header values.

Bug: T214080
Change-Id: I3de8a455ad7dab9e3a67e24439e95f4968c93243
2019-03-04 16:12:39 -05:00
jenkins-bot
9c820c9222 Merge "API: Handle Messages in errorArrayToStatus()" 2019-03-04 05:24:05 +00:00
Brian Wolff
0364f852a3 Various fixes to make phan-taint-check happier
Bug: T216348
Change-Id: If4071e689f476d2138d8964598c5a02b09448677
2019-03-04 03:24:44 +00:00
Brad Jorsch
426df4cd70 API: Handle Messages in errorArrayToStatus()
Two bugs here:
* If the error array contains an entry using a Message object instead of
  a string as the key, it'll blow up trying to do
  `self::$blockMsgMap[$error[0]]`.
* If the error array contains a Message object not wrapped in an array,
  it'll blow up trying to do `...(array)$error`.

Bug: T217382
Change-Id: I2a08e02bca0fb194416b3f2e6a1d6192d5c13cb2
2019-03-01 09:53:01 -05:00
jenkins-bot
6daa17a2a0 Merge "Remove comments literally repeating the next line of code" 2019-03-01 02:37:27 +00:00
Brad Jorsch
6a28fb3ace API: Use log context for api-feature-usage log
The text message is deprecated.

Bug: T217162
Change-Id: Ie891257140ea19369e10b2e91463a1fb4aa5d233
2019-02-27 17:06:02 -05:00
Thiemo Kreuz
37b3383e8b Remove comments literally repeating the next line of code
I would argue that these comments do not add any information that
would not be there already. Having them adds mental overhead, because
one needs to read both the comment and the next line of code first to
understand they say the exact same. I don't find this helpful, but
more distracting.

Change-Id: I39c98f25225947ebffdcc2fd8f0243e7a6c070d7
2019-02-27 17:28:40 +00:00
Petr Pchelko
a2b85209e2 Emit new style API action logs into Monolog.
Bug: T214080
Depends-On: I454d3d12dcc1d7e525dc468df90424e68df59d78
Change-Id: Id0be845884cd834d89df897cc8a862904caeb09a
2019-02-26 17:40:57 +00:00
Translation updater bot
b75bdf543c Localisation updates from https://translatewiki.net.
Change-Id: Id54b521705d09e65558ed7ce20f67280c7eac13d
2019-02-25 22:46:15 +01:00
jenkins-bot
ecbe578005 Merge "Return the page_id in list=langbacklinks as an int" 2019-02-25 02:45:42 +00:00
Reedy
93de72d9ae Return the page_id in list=langbacklinks as an int
Bug: T216968
Change-Id: I5b16779be7b24b1e46d4787a82a8daa3611f67b1
2019-02-25 01:05:44 +00:00
Reedy
4691389fa4 Use (int) rather than intval()
Bug: T216969
Change-Id: I4c06716c83b69d128f26fa7f68736808aa2d3d64
2019-02-25 00:38:33 +00:00
setian
8b8cc02ed7 Return the page_id in list=iwbacklinks as an int rather than string
Bug: T216968
Change-Id: I6645c5f1c6e76be3187c24053ed430e99c03bff4
2019-02-24 19:15:50 -05:00
Translation updater bot
09f85412af Localisation updates from https://translatewiki.net.
Change-Id: Iaa33d306da2a1daf0f99f7432b542f7bdbd72eca
2019-02-24 22:23:34 +01:00
jenkins-bot
2fe05dcf9d Merge "ApiQueryUserContribs: Only use 'contributions' replica if querying by user ID" 2019-02-22 03:58:47 +00:00
Translation updater bot
b1e9533cf7 Localisation updates from https://translatewiki.net.
Change-Id: Ibb1121f0765cd41ba7f8b6cfafb6e88d30021820
2019-02-21 21:55:49 +01:00
Brad Jorsch
fe65f68588 ApiQueryUserContribs: Only use 'contributions' replica if querying by user ID
When querying by user name or actor ID, the partitioning on the
'contributions' replicas makes things worse rather than better.

Bug: T216656
Change-Id: Ib4caf19d8fad64c527dee99667e425fd3e4b1a16
2019-02-21 11:47:11 -05:00
Brad Jorsch
c073e531cf API: Spread autoblocks from action=edit and action=move
The code in EditPage and SpecialMovepage does this primarily in web UI
code paths that aren't called by the API. EditPage also has a check in
the internal code path used by the API, but ApiEditPage runs its own
permissions check first and won't reach that code path.

Bug: T216245
Change-Id: I6263c8b60a24f3195dba583463f1ce4b004f82f5
2019-02-19 17:34:48 -05:00
Brad Jorsch
ace0338421 API: Add block info to more block errors
When using ApiBase::errorArrayToStatus(), block info was added to
'blocked' errors. But when using dieStatus() with a Status object
returned by core MediaWiki code, block info was not being added.

Change-Id: I14887b6dd76d665055283945b956b2e26c521ed5
Depends-On: Ie3addf53ab5fabf1c24e1033b58e63927f4e21bf
2019-02-19 17:34:48 -05:00
Translation updater bot
5b34aaecf1 Localisation updates from https://translatewiki.net.
Change-Id: I2316460e88bc758daa875638518105524f97ea1d
2019-02-17 21:55:23 +01:00
Bill Pirkle
d993f499ee Refactor calls to deprecated function Content::getNativeData()
Function Content::getNativeData() was deprecated.  Replace with
calls to new function TextContent::getText() in most places.

Bug: T155582
Change-Id: I2bd508c72aac4faf474ba45ab1f92e2e8d2eb9be
2019-02-15 17:48:01 +00:00
Translation updater bot
ff75ea4f05 Localisation updates from https://translatewiki.net.
Change-Id: Ic40eaf0cedbbf6a81585f4f0d686f4aa3ae7d160
2019-02-14 22:05:28 +01:00
Translation updater bot
e36ef661d9 Localisation updates from https://translatewiki.net.
Change-Id: Ia27cd1dfe1e1fecdff6431841c9e26a2daf3a865
2019-02-12 21:54:12 +01:00
jenkins-bot
9eafd89011 Merge "Prevent fatal PHP errors when PageRestriction::getTitle() returns null." 2019-02-12 16:27:04 +00:00
jenkins-bot
982d2c6e62 Merge "API: Don't return a deprecation warning for default values" 2019-02-07 22:03:09 +00:00
jenkins-bot
f9c735e3ed Merge "build: Updating mediawiki/mediawiki-codesniffer to 24.0.0" 2019-02-07 21:50:47 +00:00
Translation updater bot
c208e10de2 Localisation updates from https://translatewiki.net.
Change-Id: I36b74b2277e53dceeb60a3662eb14da9fa4f0589
2019-02-07 22:04:39 +01:00
Brad Jorsch
94110916b1 API: Don't return a deprecation warning for default values
If a deprecated parameter has a default value, or a deprecated value is
part of the default value for a parameter, don't give the client a
deprecation warning about it.

Bug: T215548
Change-Id: I980763e3d44fb1b7459c64b175fcaddf5fd44a13
2019-02-07 15:32:36 -05:00
Kunal Mehta
cc5d9a92a2 build: Updating mediawiki/mediawiki-codesniffer to 24.0.0
Change-Id: I66b1775b7c1d36076d9ca78cbeb42787a743f2aa
2019-02-07 18:39:42 +00:00
David Barratt
6710e8c212
Prevent fatal PHP errors when PageRestriction::getTitle() returns null.
Update usages of PageRestriction::getTitle() to handle a null response.

Bug: T214763
Change-Id: Ied33e2c3c9442c47ae8084a97bb0921869fb9d49
2019-02-07 10:06:15 -05:00
Translation updater bot
6faf0124bb Localisation updates from https://translatewiki.net.
Change-Id: I8431d4b4bd6c05fb77390e8b850edd88509fa41d
2019-02-05 22:05:17 +01:00
Translation updater bot
bed86f448f Localisation updates from https://translatewiki.net.
Change-Id: Ib354beb08668e1afe72246f382dc9e4396e96fea
2019-02-04 21:56:39 +01:00
Umherirrender
83aa87c968 Remove unused apihelp-createaccount messages
Unused since I2b2c9693a275fcc026916bd97f303e7a5c8df341

Change-Id: Iaaadaef063ead5d2aa30d4e943ba72e4f4dfbf9a
2019-02-04 19:53:57 +01:00
Translation updater bot
eaf0a3b004 Localisation updates from https://translatewiki.net.
Change-Id: Ic00ccbd3487d1861d3196670792ec529d1f81f73
2019-02-03 21:56:18 +01:00
Translation updater bot
326e393461 Localisation updates from https://translatewiki.net.
Change-Id: Ie2c639a0adbb91dc68109e58b6d74263e8ae0f0c
2019-01-31 21:53:43 +01:00
Translation updater bot
e6a3c2b255 Localisation updates from https://translatewiki.net.
Change-Id: If0c6e253be60e3b6b0b36f1281936b4719cb1eeb
2019-01-30 21:53:36 +01:00
Translation updater bot
95d19d7522 Localisation updates from https://translatewiki.net.
Change-Id: I55f7b5a4c28e9756e5432573a67a179aed70fa4c
2019-01-28 22:03:28 +01:00
Translation updater bot
9a95b226d0 Localisation updates from https://translatewiki.net.
Change-Id: Ia1d66a4d2b2aa5fb06b85b15c89cdc941dea363d
2019-01-26 21:54:18 +01:00
Translation updater bot
9651459311 Localisation updates from https://translatewiki.net.
Change-Id: I371f47ad51f9cce54686e9e7dad8e186274c8962
2019-01-25 22:08:04 +01:00
Translation updater bot
cd0860616a Localisation updates from https://translatewiki.net.
Change-Id: Ia3e8a3a29198b7032e95618445aa53ab72f65cf0
2019-01-24 22:16:57 +01:00
jenkins-bot
a23e9cee4e Merge "Fix typo in apierror message" 2019-01-23 21:41:08 +00:00
Translation updater bot
19ffce7203 Localisation updates from https://translatewiki.net.
Change-Id: I19182d49545679c7e86a71009616f23ba335efa5
2019-01-23 22:05:12 +01:00
jenkins-bot
24b5967313 Merge "Add namespace restrictions to Special:Block and API" 2019-01-23 17:04:55 +00:00
Ammarpad
dfb87515cd Fix typo in apierror message
Replace "conjuction" with "conjunction" in Apierror-redirect-appendonly/en message

Bug: T201491
Change-Id: Ia121deecf256888736a9a4de18967f85f063d153
2019-01-22 20:56:36 +00:00
Translation updater bot
f2ef7b7fc7 Localisation updates from https://translatewiki.net.
Change-Id: Ia9ecbc8465dd445aa109916f2e8dda5161ed2ebd
2019-01-22 21:53:23 +01:00