Commit graph

86840 commits

Author SHA1 Message Date
Reedy
31f5327b7d Collapse some else statements and nested if statements
Change-Id: Idd4d751e149e2ee11b8749ba847323f189b6ae51
2019-02-08 03:39:54 +00:00
jenkins-bot
3dd6742b3a Merge "Ensure calls to Title::getArticleID use the same case as the definition" 2019-02-07 01:02:51 +00:00
Ed Sanders
e2eda7e994 Mark jquery.throttle-debounce as deprecated
Bug: T213426
Change-Id: If1c165d479bc7b47f806fa20e103059bffc761f7
2019-02-06 15:49:52 -08:00
jenkins-bot
7599feabb5 Merge "resources: Update OOjs-Router from v0.1.0 to v0.2.0" 2019-02-06 22:24:18 +00:00
Thalia
5e683829d6 Ensure calls to Title::getArticleID use the same case as the definition
Change-Id: Ic92f43c9e9df2782ba20aa28ad9e6d2ef7976d2e
2019-02-06 22:15:05 +00:00
jenkins-bot
3ba2de358d Merge "resources: Update OOjs-Router from 48302a572 to v0.1.0" 2019-02-06 21:43:35 +00:00
James D. Forrester
c5c087bacd resources: Update OOjs-Router from v0.1.0 to v0.2.0
Change-Id: Ib6847f7328f28f31141f3ae59f0f9a0f49dbf508
2019-02-06 13:31:04 -08:00
jenkins-bot
7caf6176df Merge "Move exceptions JobQueueError to own file" 2019-02-06 20:31:19 +00:00
James D. Forrester
44ac703d19 resources: Update OOjs-Router from 48302a572 to v0.1.0
Add to foreign resource validation tool.

Change-Id: I06f5b2c258d1e72f2eb6268a6d24824bbe5d19eb
2019-02-06 11:55:37 -08:00
Bartosz Dziewoński
09eb0271e2 .phpcs.xml: Remove ignores for removed files
* includes/compat/normal/UtfNormalUtil.php
  Removed in 88ea69f2f7.

* maintenance/benchmarks/bench_strtr_str_replace.php
  Rewritten in 1031825f3b.

Change-Id: Ie88fb420e688f11c8a94ecf91cb8b839944d991d
2019-02-06 19:45:43 +00:00
Umherirrender
fa29c3c09d Move exceptions JobQueueError to own file
Change-Id: Ibd67358cb7a14497dce8a3982ceba3b4300bdd65
2019-02-06 19:39:20 +01:00
Roan Kattouw
52fbe64ef3 Use PRC_AUTOPATROLLED for rollbacks and revdel
These are automatic, and happen regardless of whether the user
performing the action has patrol-related rights.

Bug: T190408
Bug: T184791
Change-Id: Icd1f3826c378ae759f501d87ffb9988766775b27
2019-02-06 17:25:28 +00:00
Derick Alangi
027fb1c8cd Fix condition if...else in getDB() & PHPDoc comment for getUserDB()
So the conditional check should by default return $this->mDb if it's not
null, so, the else seems not to be needed(?). If we have a database handle
to process the current batch, $this->getDB() will return IMaintainableDatabase
but if it's not available (null), a call to $this->getDB() will return an
instance of \Wikimedia\Rdbms\Database is returned instead.

In accordance with the documentation (phpdoc), update the method getUserDB()
to be compliant with callers return type.

Change-Id: I95f3407dd2ffe8e4a1ad7a70be86b6cf3b65ff50
2019-02-06 09:50:59 +00:00
jenkins-bot
95aabc36ad Merge "Remove deprecated class SquidUpdate" 2019-02-06 01:33:12 +00:00
jenkins-bot
1accb936f3 Merge "Improve error handling for wrong autoloader permissions" 2019-02-06 01:12:51 +00:00
jenkins-bot
ad49bb2cb2 Merge "Fix message documentation to refer to Special:Block page" 2019-02-06 00:57:41 +00:00
jenkins-bot
855787ca31 Merge "objectcache: Fixes WinCache increment losing TTL." 2019-02-06 00:51:12 +00:00
jenkins-bot
d7678fa45e Merge "rdbms: lower value of MAX_LAG_DEFAULT to 6" 2019-02-06 00:49:15 +00:00
jenkins-bot
d98de9926d Merge "rdbms: move "maxLag" parameter up to LBFactory and add comments" 2019-02-06 00:46:39 +00:00
jenkins-bot
15575b2cb8 Merge "Add test for User::isBlockedFrom" 2019-02-06 00:46:34 +00:00
Aaron Schulz
e8276e074f rdbms: lower value of MAX_LAG_DEFAULT to 6
This matches the "max lag" value used in the server configuration
array for WMF sites for a long time.

Change-Id: Ic2e82a8cc0932e7cf28ababc2eb0849406da06ef
2019-02-06 00:29:32 +00:00
jenkins-bot
1ff1f0d8e3 Merge "Follow-up dbfe1c9a93: Fix RELEASE-NOTES typo" 2019-02-06 00:17:09 +00:00
jenkins-bot
1a641afe87 Merge "resourceloader: Support TestModules registration via extension.json" 2019-02-06 00:17:03 +00:00
Aaron Schulz
e54317e9cb rdbms: move "maxLag" parameter up to LBFactory and add comments
Also make the default value constant be define in only one place

Change-Id: I1abd2b4569910031853b25f92d7cb69a1614d05b
2019-02-05 15:59:44 -08:00
James D. Forrester
c898260f34 Follow-up dbfe1c9a93: Fix RELEASE-NOTES typo
Change-Id: Iff1acb43b32fb8c0d64f4b59d8651d9f7decff50
2019-02-05 15:28:49 -08:00
Gergő Tisza
a0381cf1dd
Improve error handling for wrong autoloader permissions
Running Composer manually with a user different from the webserver
user and ending up with a vendor/autoload.php file that's unreadable
to MediaWiki seems like an easy mistake to make. Make the error
message when that happens less cryptic.

Change-Id: I52600adceb38a7fc5384d00b5298e46a782c684f
2019-02-05 15:27:37 -08:00
jenkins-bot
d79b19498e Merge "Disallow user suppression in a partial block" 2019-02-05 23:27:37 +00:00
Timo Tijhof
d1666a89ff resourceloader: Support TestModules registration via extension.json
Bug: T126091
Change-Id: I27ecebe27d7aaebe6d1317bc5eaea9cca368b45d
2019-02-05 15:27:37 -08:00
Thalia
83407d97a1 Disallow user suppression in a partial block
Hide the "hide user" checkbox on Special:Block if the block
parameters specify a partial block. Return an error message
if a partial block with user suppression is specified via
the API. Also, make sure that an existing user suppression
is lifted if the user's block is reset to a partial block.

Bug: T210002
Change-Id: If42edfc85580d6bad6f4b397517e77e63deecc87
2019-02-05 23:11:12 +00:00
Roan Kattouw
fbbd65d2df ResourceLoader: Add support for packageFiles
Package files are files that are part of a module, but are not
immediately executed when the module executes. Instead, they are
lazy-excecuted when require() is called on them. Package files can be
scripts (JS) or data (JSON), and can be real files on the file system,
or virtual files generated by a callback.

Using virtual data files, server-side data and config variables can be
bundled with a module. Support for file-based require() allows us to
import npm modules into ResourceLoader more easily.

The require function passed to each script execution context, which was
previously a reference to the global mw.loader.require() function, is
changed to one that is scoped to the module and the file being executed.
This is needed to support relative paths: require( '../foo.js' ) can
mean a different file depending on the path of the calling file.

The results of require()ing each file (i.e. the value of module.exports
after executing it) are stored, and calling require() on the same file a
second time won't execute it again, but will return the stored value.

Miscellaneous changes:
- Add XmlJsCode::encodeObject(), which combines an associative array of
  XmlJsCode objects into one larger XmlJsCode object. This is needed for
  encoding the packageFiles parameter in mw.loader.implement() calls.

Bug: T133462
Change-Id: I78cc86e626de0720397718cd2bed8ed279579112
2019-02-05 22:05:02 +00:00
jenkins-bot
7665ec56c7 Merge "objectcache: avoid occasional test flakiness due to microtime()" 2019-02-05 21:16:08 +00:00
Translation updater bot
6faf0124bb Localisation updates from https://translatewiki.net.
Change-Id: I8431d4b4bd6c05fb77390e8b850edd88509fa41d
2019-02-05 22:05:17 +01:00
Thalia
7aad44ff48 Fix message documentation to refer to Special:Block page
Change-Id: Ib17e91c123f9f8998d2739fcb6b01c313389ea24
2019-02-05 20:55:58 +00:00
Umherirrender
6ebe568c4e Remove deprecated class SquidUpdate
Change-Id: Iac53864296990befe7c573a29dd2f35aca52a79e
2019-02-05 20:35:05 +01:00
Umherirrender
1c851623b0 Move interface ICacheHelper to own class
Change-Id: I6f2b6507b0038f0988e4db5566ebddbe0d734a70
2019-02-05 20:04:12 +01:00
Thalia
c38f247149 Add test for User::isBlockedFrom
In the complicated decision tree for checking if a blocked
user is blocked from their talk page, one situation was not
being tested: there's a partial block to the user talk
namespace, the block is flagged as allowing a user to edit
their talk page, BUT $wgBlockAllowsUTEdit is false. In this
circumstance, the user should be blocked from editing their
talk page, as outlined in T210475.

Also, fix whitespace and make messages clearer, since this
is now quite complicated.

Change-Id: I234f3019d55a6da0da091a2eaae6c791be01b436
2019-02-05 18:13:32 +00:00
jenkins-bot
9e0b0c2171 Merge "ApiQuerySiteinfoTest: Conversion of $wgContLang to service" 2019-02-05 17:49:05 +00:00
jenkins-bot
1762dcfd2f Merge "Fix 'ipb_sitewide' not matching parent block after update" 2019-02-05 14:01:53 +00:00
jenkins-bot
3433d6fd46 Merge "Add option for confirmation prompts on rollbacks" 2019-02-05 13:29:52 +00:00
jenkins-bot
e26e0d1fc8 Merge "Fix grammar of "config-db-host-help"" 2019-02-05 10:45:42 +00:00
jenkins-bot
70d9fbb0bf Merge "Add BeforeResetNotificationTimestamp hook" 2019-02-05 09:00:42 +00:00
James Montalvo
ac3e1829c5 Add BeforeResetNotificationTimestamp hook
Allows prevention of clearing of notification timestamp when a user
views a page in their watchlist.

Change-Id: Id0af5c89c648ac6dce80012a1566426d5552942f
2019-02-05 08:36:21 +00:00
jenkins-bot
5f9e9f4e07 Merge "Move interface IJobSpecification to own file" 2019-02-05 05:44:30 +00:00
Aaron Schulz
e4930d255b objectcache: avoid occasional test flakiness due to microtime()
* Fix the timestamps to static hard-coded values
* Force the timestamps before various get/set tests so they do not
  use the microtime() value either.
* Remove the direct and duplicated (causing further risk) microtime()
  calls from testGetWithSeveralCheckKeys().

Bug: T207247
Change-Id: Id30a8127f11501dbe54e075b6e9d18490353f4a5
2019-02-04 21:35:42 -08:00
Fomafix
19f9660461 ApiQuerySiteinfoTest: Conversion of $wgContLang to service
Bug: T200246
Change-Id: Ibdf07adc7a4cf28f0f9f48f18985651a379bc10c
2019-02-05 05:05:53 +01:00
jenkins-bot
196f444a3d Merge "Display translatable images in wiki language on image pages" 2019-02-05 02:14:14 +00:00
jenkins-bot
0c68254dc6 Merge "specialpage: Fix login crash caused by unknown language via ?uselang" 2019-02-05 01:33:00 +00:00
Max Semenik
ce071ded51 Display translatable images in wiki language on image pages
We currently show SVGs in default languages unless overridden with
lang=... URL parameter (and we have UI for setting it). This change
makes it display thumbnails in wiki language, if translation is available.

Bug: T210814
Change-Id: Ieb0b5e9e27f45b71ef119bb3c1d3f2cd4d7100e5
2019-02-04 15:57:37 -08:00
Dayllan Maza
e77fdb8999 Fix 'ipb_sitewide' not matching parent block after update
Autoblocks ipb_sitewide was not being updated when changing the parent
block from sitewide to partial and vice-versa

Bug: T215205
Change-Id: Ied5a8361a733c47f0afea78cc955732261ede446
2019-02-04 17:31:55 -05:00
Translation updater bot
bed86f448f Localisation updates from https://translatewiki.net.
Change-Id: Ib354beb08668e1afe72246f382dc9e4396e96fea
2019-02-04 21:56:39 +01:00