lhc/web/wiklou.git
5 years agoDrop MWExceptionHandler::getLogId(), deprecated in 1.27 and unused
James D. Forrester [Sat, 9 Feb 2019 01:37:23 +0000 (17:37 -0800)]
Drop MWExceptionHandler::getLogId(), deprecated in 1.27 and unused

Change-Id: Id03aaf4f2ea5c910e13274826e44033e12adcd2e

5 years agoDrop JsonContent->getJsonData(), deprecated in 1.25 and unused
James D. Forrester [Sat, 9 Feb 2019 01:36:01 +0000 (17:36 -0800)]
Drop JsonContent->getJsonData(), deprecated in 1.25 and unused

Change-Id: I2cac3a1d2cda799c302ca2364fb91916c3240c11

5 years agoDrop LinkCache->addLink(), deprecated in 1.27 and unused
James D. Forrester [Sat, 9 Feb 2019 01:34:49 +0000 (17:34 -0800)]
Drop LinkCache->addLink(), deprecated in 1.27 and unused

Change-Id: Id6395cc9a122375349b7a13c051049bca3f5ab08

5 years agoMerge "Drop EventRelayerGroup::singleton(), deprecated in 1.27 and unused"
jenkins-bot [Sat, 9 Feb 2019 07:44:02 +0000 (07:44 +0000)]
Merge "Drop EventRelayerGroup::singleton(), deprecated in 1.27 and unused"

5 years agoMerge "Drop Linker::formatTemplates, deprecated in 1.28 and unused"
jenkins-bot [Sat, 9 Feb 2019 07:38:21 +0000 (07:38 +0000)]
Merge "Drop Linker::formatTemplates, deprecated in 1.28 and unused"

5 years agoMerge "Drop Linker::formatSize, deprecated in 1.28 and unused"
jenkins-bot [Sat, 9 Feb 2019 07:33:23 +0000 (07:33 +0000)]
Merge "Drop Linker::formatSize, deprecated in 1.28 and unused"

5 years agoDrop EventRelayerGroup::singleton(), deprecated in 1.27 and unused
James D. Forrester [Sat, 9 Feb 2019 01:32:42 +0000 (17:32 -0800)]
Drop EventRelayerGroup::singleton(), deprecated in 1.27 and unused

Change-Id: I9e63fc255a575086a6c0934e51e593b5ee0a31d8

5 years agoMerge "Persist sessions pre-send instead of post-send"
jenkins-bot [Sat, 9 Feb 2019 02:21:22 +0000 (02:21 +0000)]
Merge "Persist sessions pre-send instead of post-send"

5 years agoMerge "resourceloader: Require logName parameter in mw.log.deprecate()"
jenkins-bot [Sat, 9 Feb 2019 02:21:17 +0000 (02:21 +0000)]
Merge "resourceloader: Require logName parameter in mw.log.deprecate()"

5 years agoresourceloader: Require logName parameter in mw.log.deprecate()
Timo Tijhof [Sat, 9 Feb 2019 01:36:13 +0000 (01:36 +0000)]
resourceloader: Require logName parameter in mw.log.deprecate()

When omitted it, it previously defaulted to the key string, which
would automatically lead to the creation of confusing and
non-descript Graphite metrics. (Via the WikimediaEvents extension
via the 'mw.deprecate' tracking topic.)

If Graphite tracking is intended, require the logName parameter
to be set. For example, in wikibits, a deprecated 'write' method
is set on the 'document' object. Its Graphite property under
mw/js/deprecate/ will be document_write because logName is set.
Without logName, it would previously create 'mw/js/deprecate/write'
as metric, which easily clashes and is not very understandable
in Grafana.

An exception is kept for properties of the window object as their
fully-qualified property name would always be identical due to
them being available as global variables.

Change-Id: I9d99fe0395ec5309eac0895f2419f7cd16caeb94

5 years agoDrop Linker::formatTemplates, deprecated in 1.28 and unused
James D. Forrester [Sat, 9 Feb 2019 01:31:42 +0000 (17:31 -0800)]
Drop Linker::formatTemplates, deprecated in 1.28 and unused

Change-Id: I02e677021cdc1fc7ac6da4839a23b15afcfb2296

5 years agoDrop Linker::formatSize, deprecated in 1.28 and unused
James D. Forrester [Sat, 9 Feb 2019 01:31:29 +0000 (17:31 -0800)]
Drop Linker::formatSize, deprecated in 1.28 and unused

Change-Id: Id119e9f3ff0d27b59654876bad9212cc0f3c5a2d

5 years agoDrop SiteSQLStore, deprecated in 1.27, unused
James D. Forrester [Sat, 9 Feb 2019 01:26:04 +0000 (17:26 -0800)]
Drop SiteSQLStore, deprecated in 1.27, unused

Change-Id: I6743417c3aafbba59ac02350e0190fbf688a5a40

5 years agoMerge "Remove old Title CSS/JS methods, deprecated in 1.31, unused"
jenkins-bot [Sat, 9 Feb 2019 01:14:39 +0000 (01:14 +0000)]
Merge "Remove old Title CSS/JS methods, deprecated in 1.31, unused"

5 years agoMerge "Remove Title->canTalk, deprecated in 1.30, unused"
jenkins-bot [Sat, 9 Feb 2019 01:05:02 +0000 (01:05 +0000)]
Merge "Remove Title->canTalk, deprecated in 1.30, unused"

5 years agoMerge "Remove Title::escapeFragmentForURL, deprecated in 1.30, unused"
jenkins-bot [Sat, 9 Feb 2019 00:44:57 +0000 (00:44 +0000)]
Merge "Remove Title::escapeFragmentForURL, deprecated in 1.30, unused"

5 years agoUse packageFiles feature to replace special-purpose RL modules
Roan Kattouw [Mon, 5 Nov 2018 22:20:05 +0000 (14:20 -0800)]
Use packageFiles feature to replace special-purpose RL modules

For config vars, add a virtual package file called 'config.js', and use
require( './config.js' ) in the module. For most data modules, add a
virtual package file called 'data.js', use require( './data.js' ) in the
module. Where needed, add wrapper files that put the data in the
relevant global object and in module.exports.

LanguageDataModule is the only special-purpose module not being removed
in this commit, because it uses languageScripts, and those are not
compatible with packageFiles (yet).

Also merge mediawiki.ForeignStructuredUpload.config into
mediawiki.ForeignStructuredUpload, since that was the only thing that
used it.

Change-Id: I203d4e3ecdeeeb16729eba2dcf40d11a41d2e582

5 years agoRemove old Title CSS/JS methods, deprecated in 1.31, unused
James D. Forrester [Fri, 8 Feb 2019 01:03:39 +0000 (17:03 -0800)]
Remove old Title CSS/JS methods, deprecated in 1.31, unused

Change-Id: I500b5efbdc2ee3b4ca09662ed0df89e9d7514bbd

5 years agoMerge "Remove Title->getSquidURLs, deprecated in 1.27, unused"
jenkins-bot [Fri, 8 Feb 2019 19:52:12 +0000 (19:52 +0000)]
Merge "Remove Title->getSquidURLs, deprecated in 1.27, unused"

5 years agoMerge "Fix mw-ui-quiet+progressive/destructive selectors"
jenkins-bot [Fri, 8 Feb 2019 19:51:12 +0000 (19:51 +0000)]
Merge "Fix mw-ui-quiet+progressive/destructive selectors"

5 years agoMWHttpRequest: Include the request ID in outgoing HTTP requests
Marko Obrovac [Fri, 1 Feb 2019 23:48:08 +0000 (15:48 -0800)]
MWHttpRequest: Include the request ID in outgoing HTTP requests

In order to be able to trace requests across the production environment,
we attach the X-Request-Id to outgoing requests.

Bug: T201409
Change-Id: Iadd6cbd51a78a1876a1a318783b51635717d054f

5 years agoNoLocalSettings: Remove style for the html element
Fomafix [Fri, 8 Feb 2019 18:35:40 +0000 (19:35 +0100)]
NoLocalSettings: Remove style for the html element

There is no need to style the html element. A style of the body element
is enough.

Change-Id: I4ab90824de393de3569ff55cf0138a7aede5770c

5 years agoFix mw-ui-quiet+progressive/destructive selectors
Ed Sanders [Fri, 8 Feb 2019 14:13:03 +0000 (14:13 +0000)]
Fix mw-ui-quiet+progressive/destructive selectors

Bonus: Fix color of disabled button text

Bug: T215610
Change-Id: I6e38355b46d87920605604beb0141cf097efab08

5 years agoMerge "Collapse some else statements and nested if statements"
jenkins-bot [Fri, 8 Feb 2019 03:55:22 +0000 (03:55 +0000)]
Merge "Collapse some else statements and nested if statements"

5 years agoMerge "Expose external link additions and deletions"
jenkins-bot [Fri, 8 Feb 2019 03:46:09 +0000 (03:46 +0000)]
Merge "Expose external link additions and deletions"

5 years agoCollapse some else statements and nested if statements
Reedy [Thu, 7 Feb 2019 03:28:29 +0000 (03:28 +0000)]
Collapse some else statements and nested if statements

Change-Id: Idd4d751e149e2ee11b8749ba847323f189b6ae51

5 years agoMerge "Move upload stash related exceptions to own files"
jenkins-bot [Fri, 8 Feb 2019 02:50:54 +0000 (02:50 +0000)]
Merge "Move upload stash related exceptions to own files"

5 years agoRemove Title->canTalk, deprecated in 1.30, unused
James D. Forrester [Fri, 8 Feb 2019 01:02:52 +0000 (17:02 -0800)]
Remove Title->canTalk, deprecated in 1.30, unused

Change-Id: I0c397f8d33a2841343c7907b233530bf3c88e212

5 years agoChange HttpRequestFactory default to guzzle
Bill Pirkle [Wed, 6 Feb 2019 16:29:52 +0000 (10:29 -0600)]
Change HttpRequestFactory default to guzzle

Activate the changes from T212175 by changing the default
MWHttpRequest-derived type to guzzle.  This is being done
as a separate change so that it is conveniently revertable
if issues arise.

Bug: T214703
Change-Id: I0868d2e7f3eed6d7c6b15334eb3187f3edcd7bec

5 years agoRemove Title::escapeFragmentForURL, deprecated in 1.30, unused
James D. Forrester [Fri, 8 Feb 2019 01:02:15 +0000 (17:02 -0800)]
Remove Title::escapeFragmentForURL, deprecated in 1.30, unused

Change-Id: I649f3f1346c366e722fe4fd8690773bedce7ec54

5 years agoRemove Title->getSquidURLs, deprecated in 1.27, unused
James D. Forrester [Fri, 8 Feb 2019 01:01:40 +0000 (17:01 -0800)]
Remove Title->getSquidURLs, deprecated in 1.27, unused

Change-Id: I9e9b8ba33ba5d5cb219d00879ecb45b6b005b7e3

5 years agoresourceloader: Fix localStorage for multi-file modules
Roan Kattouw [Thu, 7 Feb 2019 22:28:10 +0000 (14:28 -0800)]
resourceloader: Fix localStorage for multi-file modules

I had forgotten to update mw.loader.store.set() for the new multi-file
module format.

Follows-up fbbd65d2df43f522f4deae719.

Change-Id: I27edeb43b218c93761ea7c394e18fac7a5cc914d

5 years agoExpose external link additions and deletions
Baha [Thu, 7 Feb 2019 16:10:09 +0000 (11:10 -0500)]
Expose external link additions and deletions

Needed for links event stream.

Bug: T214706
Change-Id: Ie93c8d90c2f69d7a08b8a6e9a0a5bb8266d4dd51

5 years agoMerge "API: Don't return a deprecation warning for default values"
jenkins-bot [Thu, 7 Feb 2019 22:03:09 +0000 (22:03 +0000)]
Merge "API: Don't return a deprecation warning for default values"

5 years agoMerge "build: Updating mediawiki/mediawiki-codesniffer to 24.0.0"
jenkins-bot [Thu, 7 Feb 2019 21:50:47 +0000 (21:50 +0000)]
Merge "build: Updating mediawiki/mediawiki-codesniffer to 24.0.0"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 7 Feb 2019 21:04:39 +0000 (22:04 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I36b74b2277e53dceeb60a3662eb14da9fa4f0589

5 years agoAPI: Don't return a deprecation warning for default values
Brad Jorsch [Thu, 7 Feb 2019 20:32:36 +0000 (15:32 -0500)]
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

5 years agoMerge "build: Add 'svgmin' Grunt task and crush SVGs"
jenkins-bot [Thu, 7 Feb 2019 19:52:45 +0000 (19:52 +0000)]
Merge "build: Add 'svgmin' Grunt task and crush SVGs"

5 years agoMerge "Ensure action object matches passed in right in Title::checkUserBlock()"
jenkins-bot [Thu, 7 Feb 2019 19:29:54 +0000 (19:29 +0000)]
Merge "Ensure action object matches passed in right in Title::checkUserBlock()"

5 years agoEnsure action object matches passed in right in Title::checkUserBlock()
David Barratt [Tue, 8 Jan 2019 21:14:48 +0000 (16:14 -0500)]
Ensure action object matches passed in right in Title::checkUserBlock()

There is a possibility that the retrieved action (by name) will not match the
passed in right, we should ensure that the retrieved action matches.

Also adds 'purge' to the whitelist of actions that are not prevented by a
block.

Bug: T213220
Change-Id: I5671dcd6f004b1663c8a5c5aec200abbf742ec1d

5 years agobuild: Updating mediawiki/mediawiki-codesniffer to 24.0.0
Kunal Mehta [Thu, 7 Feb 2019 09:21:19 +0000 (01:21 -0800)]
build: Updating mediawiki/mediawiki-codesniffer to 24.0.0

Change-Id: I66b1775b7c1d36076d9ca78cbeb42787a743f2aa

5 years agoresources: Allow jquery.ui.widgets on mobile
James D. Forrester [Thu, 7 Feb 2019 18:13:29 +0000 (10:13 -0800)]
resources: Allow jquery.ui.widgets on mobile

Change-Id: If0d7b687e5996e5dcdce0651c85a4dc4461b482b

5 years agoMerge "Stop overwriting $cache in User::getCacheKey()"
jenkins-bot [Thu, 7 Feb 2019 16:57:13 +0000 (16:57 +0000)]
Merge "Stop overwriting $cache in User::getCacheKey()"

5 years agobuild: Add 'svgmin' Grunt task and crush SVGs
Volker E [Thu, 7 Feb 2019 05:53:50 +0000 (21:53 -0800)]
build: Add 'svgmin' Grunt task and crush SVGs

Adding 'grunt-svgmin' package and corresponding 'svgmin' task and
also crush SVGs. Several of them are featuring bad UX and are not optimal
in many different angles (a.o. clarity, universality, recognizablity etc.).
Specifically the 'mediawiki.skinning' ones.
But while they are here, let's make them suck less.

Change-Id: I8191ceac14565ae31d941982fab1586fa9b6bbdd

5 years agoMostly drop old comment schemas
Brad Jorsch [Fri, 4 Jan 2019 18:55:11 +0000 (13:55 -0500)]
Mostly drop old comment schemas

This removes most of the pre-CommentStore text columns, and the
$wgCommentTableSchemaMigrationStage setting that used to determine
whether the columns were used.

rev_comment remains in the code, as on Wikimedia wikis the revision
table is too large to alter at this time. A future change will combine
that with the removal of rev_user_text, rev_content_model, and
rev_content_format (and the addition of rev_comment_id and rev_actor).

CommentStore's constructor continues to take a $stage parameter, and
continues to have the logic for handling it, for the benefit of
extensions that might need their own migration process.

Bug: T166733
Change-Id: I1479c73774e01ead1490adf6128f820c09bce9d4

5 years agoImprove performance of ActiveUsersPager query
Brad Jorsch [Mon, 9 Jul 2018 19:22:45 +0000 (15:22 -0400)]
Improve performance of ActiveUsersPager query

The query can be very slow, as it has to scan all the recentchanges rows
for all the users in querycachetwo (for activeusers). We can speed that
up at the cost of not filtering out users who were active when
querycachetwo was last updated but aren't anymore.

Also in testing this I found that the query is extremely slow when the
actor table migration stage is in one of the transitional states. This
too can be sped up with some custom logic.

Bug: T199044
Change-Id: Ia9d2ff00cfcdcc6191d854eb4365ecbf67f60b1c

5 years agoStop overwriting $cache in User::getCacheKey()
Reedy [Thu, 7 Feb 2019 03:30:57 +0000 (03:30 +0000)]
Stop overwriting $cache in User::getCacheKey()

Replace a few deprecated function calls

Bug: T215483
Change-Id: I000b58d8bf67d9c1ea0123a7547b986e8ca69f25

5 years agoMerge "Make invalidateModuleCache() take a database domain ID"
jenkins-bot [Thu, 7 Feb 2019 01:42:14 +0000 (01:42 +0000)]
Merge "Make invalidateModuleCache() take a database domain ID"

5 years agoMerge "Rename WikiMap DB domain ID methods to reduce confusion with web domains"
jenkins-bot [Thu, 7 Feb 2019 01:42:09 +0000 (01:42 +0000)]
Merge "Rename WikiMap DB domain ID methods to reduce confusion with web domains"

5 years agoMerge "Ensure calls to Title::getArticleID use the same case as the definition"
jenkins-bot [Thu, 7 Feb 2019 01:02:51 +0000 (01:02 +0000)]
Merge "Ensure calls to Title::getArticleID use the same case as the definition"

5 years agoMark jquery.throttle-debounce as deprecated
Ed Sanders [Thu, 10 Jan 2019 13:21:38 +0000 (13:21 +0000)]
Mark jquery.throttle-debounce as deprecated

Bug: T213426
Change-Id: If1c165d479bc7b47f806fa20e103059bffc761f7

5 years agoPersist sessions pre-send instead of post-send
Aaron Schulz [Wed, 6 Feb 2019 22:28:02 +0000 (14:28 -0800)]
Persist sessions pre-send instead of post-send

This avoids race conditions with certain web request patterns

Bug: T214471
Change-Id: I4dfee10326485e98b028585c7da2e6b30787bb91

5 years agoMerge "resources: Update OOjs-Router from v0.1.0 to v0.2.0"
jenkins-bot [Wed, 6 Feb 2019 22:24:18 +0000 (22:24 +0000)]
Merge "resources: Update OOjs-Router from v0.1.0 to v0.2.0"

5 years agoEnsure calls to Title::getArticleID use the same case as the definition
Thalia [Wed, 6 Feb 2019 22:15:05 +0000 (22:15 +0000)]
Ensure calls to Title::getArticleID use the same case as the definition

Change-Id: Ic92f43c9e9df2782ba20aa28ad9e6d2ef7976d2e

5 years agoMerge "resources: Update OOjs-Router from 48302a572 to v0.1.0"
jenkins-bot [Wed, 6 Feb 2019 21:43:35 +0000 (21:43 +0000)]
Merge "resources: Update OOjs-Router from 48302a572 to v0.1.0"

5 years agoresources: Update OOjs-Router from v0.1.0 to v0.2.0
James D. Forrester [Wed, 6 Feb 2019 20:22:03 +0000 (12:22 -0800)]
resources: Update OOjs-Router from v0.1.0 to v0.2.0

Change-Id: Ib6847f7328f28f31141f3ae59f0f9a0f49dbf508

5 years agoMove upload stash related exceptions to own files
Umherirrender [Wed, 6 Feb 2019 21:22:01 +0000 (22:22 +0100)]
Move upload stash related exceptions to own files

Change-Id: I23e81af2f1bf73f5cd78a01bcc2fcebb4c4ea038

5 years agoMake invalidateModuleCache() take a database domain ID
Aaron Schulz [Wed, 6 Feb 2019 20:38:18 +0000 (12:38 -0800)]
Make invalidateModuleCache() take a database domain ID

Change-Id: I5d9880a5aee4b055365549671258eb9f242a37d6

5 years agoMerge "Move exceptions JobQueueError to own file"
jenkins-bot [Wed, 6 Feb 2019 20:31:19 +0000 (20:31 +0000)]
Merge "Move exceptions JobQueueError to own file"

5 years agoRename WikiMap DB domain ID methods to reduce confusion with web domains
Aaron Schulz [Wed, 6 Feb 2019 20:28:45 +0000 (12:28 -0800)]
Rename WikiMap DB domain ID methods to reduce confusion with web domains

Those added in this same release do not need alias methods.

Change-Id: I05feeb9b0b13afe43aea1f95551965489cdbe094

5 years agoresources: Update OOjs-Router from 48302a572 to v0.1.0
James D. Forrester [Wed, 6 Feb 2019 19:52:46 +0000 (11:52 -0800)]
resources: Update OOjs-Router from 48302a572 to v0.1.0

Add to foreign resource validation tool.

Change-Id: I06f5b2c258d1e72f2eb6268a6d24824bbe5d19eb

5 years ago.phpcs.xml: Remove ignores for removed files
Bartosz Dziewoński [Wed, 6 Feb 2019 12:10:52 +0000 (13:10 +0100)]
.phpcs.xml: Remove ignores for removed files

* includes/compat/normal/UtfNormalUtil.php
  Removed in 88ea69f2f7fa33dfc2ab787ed069380f76d4b7ef.

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

Change-Id: Ie88fb420e688f11c8a94ecf91cb8b839944d991d

5 years agoMove exceptions JobQueueError to own file
Umherirrender [Wed, 6 Feb 2019 18:39:20 +0000 (19:39 +0100)]
Move exceptions JobQueueError to own file

Change-Id: Ibd67358cb7a14497dce8a3982ceba3b4300bdd65

5 years agoUse PRC_AUTOPATROLLED for rollbacks and revdel
Roan Kattouw [Thu, 26 Apr 2018 18:23:32 +0000 (11:23 -0700)]
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

5 years agoFix condition if...else in getDB() & PHPDoc comment for getUserDB()
Derick Alangi [Mon, 4 Feb 2019 12:45:39 +0000 (13:45 +0100)]
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

5 years agoMerge "Remove deprecated class SquidUpdate"
jenkins-bot [Wed, 6 Feb 2019 01:33:12 +0000 (01:33 +0000)]
Merge "Remove deprecated class SquidUpdate"

5 years agoMerge "Improve error handling for wrong autoloader permissions"
jenkins-bot [Wed, 6 Feb 2019 01:12:51 +0000 (01:12 +0000)]
Merge "Improve error handling for wrong autoloader permissions"

5 years agoMerge "Fix message documentation to refer to Special:Block page"
jenkins-bot [Wed, 6 Feb 2019 00:57:41 +0000 (00:57 +0000)]
Merge "Fix message documentation to refer to Special:Block page"

5 years agoMerge "objectcache: Fixes WinCache increment losing TTL."
jenkins-bot [Wed, 6 Feb 2019 00:51:12 +0000 (00:51 +0000)]
Merge "objectcache: Fixes WinCache increment losing TTL."

5 years agoMerge "rdbms: lower value of MAX_LAG_DEFAULT to 6"
jenkins-bot [Wed, 6 Feb 2019 00:49:15 +0000 (00:49 +0000)]
Merge "rdbms: lower value of MAX_LAG_DEFAULT to 6"

5 years agoMerge "rdbms: move "maxLag" parameter up to LBFactory and add comments"
jenkins-bot [Wed, 6 Feb 2019 00:46:39 +0000 (00:46 +0000)]
Merge "rdbms: move "maxLag" parameter up to LBFactory and add comments"

5 years agoMerge "Add test for User::isBlockedFrom"
jenkins-bot [Wed, 6 Feb 2019 00:46:34 +0000 (00:46 +0000)]
Merge "Add test for User::isBlockedFrom"

5 years agordbms: lower value of MAX_LAG_DEFAULT to 6
Aaron Schulz [Sun, 27 Jan 2019 22:15:13 +0000 (14:15 -0800)]
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

5 years agoMerge "Follow-up dbfe1c9a935: Fix RELEASE-NOTES typo"
jenkins-bot [Wed, 6 Feb 2019 00:17:09 +0000 (00:17 +0000)]
Merge "Follow-up dbfe1c9a935: Fix RELEASE-NOTES typo"

5 years agoMerge "resourceloader: Support TestModules registration via extension.json"
jenkins-bot [Wed, 6 Feb 2019 00:17:03 +0000 (00:17 +0000)]
Merge "resourceloader: Support TestModules registration via extension.json"

5 years agordbms: move "maxLag" parameter up to LBFactory and add comments
Aaron Schulz [Sun, 27 Jan 2019 21:59:59 +0000 (13:59 -0800)]
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

5 years agoFollow-up dbfe1c9a935: Fix RELEASE-NOTES typo
James D. Forrester [Tue, 5 Feb 2019 23:28:49 +0000 (15:28 -0800)]
Follow-up dbfe1c9a935: Fix RELEASE-NOTES typo

Change-Id: Iff1acb43b32fb8c0d64f4b59d8651d9f7decff50

5 years agoImprove error handling for wrong autoloader permissions
Gergő Tisza [Sat, 2 Feb 2019 19:56:31 +0000 (11:56 -0800)]
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

5 years agoMerge "Disallow user suppression in a partial block"
jenkins-bot [Tue, 5 Feb 2019 23:27:37 +0000 (23:27 +0000)]
Merge "Disallow user suppression in a partial block"

5 years agoresourceloader: Support TestModules registration via extension.json
Timo Tijhof [Fri, 18 Jan 2019 20:21:35 +0000 (12:21 -0800)]
resourceloader: Support TestModules registration via extension.json

Bug: T126091
Change-Id: I27ecebe27d7aaebe6d1317bc5eaea9cca368b45d

5 years agoDisallow user suppression in a partial block
Thalia [Mon, 14 Jan 2019 14:21:50 +0000 (14:21 +0000)]
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

5 years agoResourceLoader: Add support for packageFiles
Roan Kattouw [Sat, 3 Nov 2018 00:53:17 +0000 (17:53 -0700)]
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

5 years agoMerge "objectcache: avoid occasional test flakiness due to microtime()"
jenkins-bot [Tue, 5 Feb 2019 21:16:08 +0000 (21:16 +0000)]
Merge "objectcache: avoid occasional test flakiness due to microtime()"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 5 Feb 2019 21:05:17 +0000 (22:05 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I8431d4b4bd6c05fb77390e8b850edd88509fa41d

5 years agoFix message documentation to refer to Special:Block page
Thalia [Tue, 5 Feb 2019 20:55:58 +0000 (20:55 +0000)]
Fix message documentation to refer to Special:Block page

Change-Id: Ib17e91c123f9f8998d2739fcb6b01c313389ea24

5 years agoRemove deprecated class SquidUpdate
Umherirrender [Tue, 5 Feb 2019 19:35:05 +0000 (20:35 +0100)]
Remove deprecated class SquidUpdate

Change-Id: Iac53864296990befe7c573a29dd2f35aca52a79e

5 years agoMove interface ICacheHelper to own class
Umherirrender [Tue, 5 Feb 2019 19:04:12 +0000 (20:04 +0100)]
Move interface ICacheHelper to own class

Change-Id: I6f2b6507b0038f0988e4db5566ebddbe0d734a70

5 years agoAdd test for User::isBlockedFrom
Thalia [Tue, 5 Feb 2019 17:20:58 +0000 (17:20 +0000)]
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

5 years agoMerge "ApiQuerySiteinfoTest: Conversion of $wgContLang to service"
jenkins-bot [Tue, 5 Feb 2019 17:49:05 +0000 (17:49 +0000)]
Merge "ApiQuerySiteinfoTest: Conversion of $wgContLang to service"

5 years agoMerge "Fix 'ipb_sitewide' not matching parent block after update"
jenkins-bot [Tue, 5 Feb 2019 14:01:53 +0000 (14:01 +0000)]
Merge "Fix 'ipb_sitewide' not matching parent block after update"

5 years agoMerge "Add option for confirmation prompts on rollbacks"
jenkins-bot [Tue, 5 Feb 2019 13:29:52 +0000 (13:29 +0000)]
Merge "Add option for confirmation prompts on rollbacks"

5 years agoMerge "Fix grammar of "config-db-host-help""
jenkins-bot [Tue, 5 Feb 2019 10:45:42 +0000 (10:45 +0000)]
Merge "Fix grammar of "config-db-host-help""

5 years agoMerge "Add BeforeResetNotificationTimestamp hook"
jenkins-bot [Tue, 5 Feb 2019 09:00:42 +0000 (09:00 +0000)]
Merge "Add BeforeResetNotificationTimestamp hook"

5 years agoAdd BeforeResetNotificationTimestamp hook
James Montalvo [Fri, 16 Nov 2018 00:09:11 +0000 (18:09 -0600)]
Add BeforeResetNotificationTimestamp hook

Allows prevention of clearing of notification timestamp when a user
views a page in their watchlist.

Change-Id: Id0af5c89c648ac6dce80012a1566426d5552942f

5 years agoMerge "Move interface IJobSpecification to own file"
jenkins-bot [Tue, 5 Feb 2019 05:44:30 +0000 (05:44 +0000)]
Merge "Move interface IJobSpecification to own file"

5 years agoobjectcache: avoid occasional test flakiness due to microtime()
Aaron Schulz [Tue, 5 Feb 2019 05:35:42 +0000 (21:35 -0800)]
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

5 years agoApiQuerySiteinfoTest: Conversion of $wgContLang to service
Fomafix [Tue, 5 Feb 2019 03:52:00 +0000 (04:52 +0100)]
ApiQuerySiteinfoTest: Conversion of $wgContLang to service

Bug: T200246
Change-Id: Ibdf07adc7a4cf28f0f9f48f18985651a379bc10c

5 years agoMerge "Display translatable images in wiki language on image pages"
jenkins-bot [Tue, 5 Feb 2019 02:14:14 +0000 (02:14 +0000)]
Merge "Display translatable images in wiki language on image pages"

5 years agoMerge "specialpage: Fix login crash caused by unknown language via ?uselang"
jenkins-bot [Tue, 5 Feb 2019 01:33:00 +0000 (01:33 +0000)]
Merge "specialpage: Fix login crash caused by unknown language via ?uselang"

5 years agoDisplay translatable images in wiki language on image pages
Max Semenik [Wed, 9 Jan 2019 20:48:02 +0000 (12:48 -0800)]
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