lhc/web/wiklou.git
4 years agoRemove $wgMemCachedDebug
Aaron Schulz [Wed, 28 Aug 2019 21:11:21 +0000 (14:11 -0700)]
Remove $wgMemCachedDebug

Change-Id: I98380ac1cb66e33719b4836410311aea3513115c

4 years agoMerge "build: Upgrade eslint-utils dependency from 1.3.1 to 1.4.2 for security issues"
jenkins-bot [Thu, 29 Aug 2019 15:22:09 +0000 (15:22 +0000)]
Merge "build: Upgrade eslint-utils dependency from 1.3.1 to 1.4.2 for security issues"

4 years agoMerge "Fix FileBackendGroup test for some configurations"
jenkins-bot [Thu, 29 Aug 2019 14:53:49 +0000 (14:53 +0000)]
Merge "Fix FileBackendGroup test for some configurations"

4 years agoFix FileBackendGroup test for some configurations
Aryeh Gregor [Thu, 29 Aug 2019 11:10:46 +0000 (14:10 +0300)]
Fix FileBackendGroup test for some configurations

The expected value of FileBackendGroup::config()['srvCache'] was being
obtained from MediaWikiServices::getLocalServerObjectCache(), but the
class actually used ObjectCache::getLocalServerInstance( 'hash' ). It
happens these are often the same, so it passed the gate-and-submit jobs,
but it's causing failures on Travis CI.

Follow-up to bd2a4395025, which added the failing test. Thanks to
Krinkle for pointing out the failures on CI.

Change-Id: I17651766f4ee2752dfcae9574d2538269dec4ebe

4 years agoMerge "Remove unneeded overrideMwServices/resetServices"
jenkins-bot [Thu, 29 Aug 2019 13:22:31 +0000 (13:22 +0000)]
Merge "Remove unneeded overrideMwServices/resetServices"

4 years agoMerge "Call resetServices() when setting globals in tests"
jenkins-bot [Thu, 29 Aug 2019 13:21:27 +0000 (13:21 +0000)]
Merge "Call resetServices() when setting globals in tests"

4 years agoMerge "Add UnknownContentHandler."
jenkins-bot [Thu, 29 Aug 2019 12:09:45 +0000 (12:09 +0000)]
Merge "Add UnknownContentHandler."

4 years agoRemove unneeded overrideMwServices/resetServices
Aryeh Gregor [Mon, 26 Aug 2019 09:13:49 +0000 (12:13 +0300)]
Remove unneeded overrideMwServices/resetServices

Change-Id: If6cbdec05b8f310ef3a0b4649aaa16d9fb80a047

4 years agoCall resetServices() when setting globals in tests
Aryeh Gregor [Mon, 26 Aug 2019 08:17:59 +0000 (11:17 +0300)]
Call resetServices() when setting globals in tests

Now that resetServices() will preserve (but reset) customized services,
it should be reasonably safe to call it every time globals are changed,
and much more effective than relying on tests to call it every time
themselves.

Depends-On: Iab8ea3a61bbc6803805d855ef23c071067646f71
Depends-On: I00e35ecea6a27468674b2a6e7d9d9eb6518e3bd5
Change-Id: Ie7a89f6ed7d52a0bc01672019ff92e7ee105a1f3

4 years agoAvoid fatal errors when reporting exceptions.
daniel [Thu, 29 Aug 2019 11:07:46 +0000 (13:07 +0200)]
Avoid fatal errors when reporting exceptions.

When reporting exceptions that occur during initialization, wgUser may
be null. Don't die when that happens.

Change-Id: I65d5a17d80f9021e28a218c7a5a17e399bc7ce98

4 years agoAdd UnknownContentHandler.
daniel [Wed, 21 Aug 2019 15:51:10 +0000 (17:51 +0200)]
Add UnknownContentHandler.

UnknownContentHandler can be configued to handle models that
belong to extensions that have been undeployed:

  $wgContentHandlers['xyzzy'] = 'UnknownContentHandler';

This way, no errors will be thrown when trying to access
pages with the unsupported model. Instead, an error message is
shown, and editing is prevented.

This patch also improves handling of non-editable content in
EditPage and in DifferenceEngine.

Bug: T220608
Change-Id: Ia94521b786c0a5225a674e4dc3cb6761a723d75b

4 years agoMerge "Fix categories detele SPARQL clause"
jenkins-bot [Thu, 29 Aug 2019 06:51:45 +0000 (06:51 +0000)]
Merge "Fix categories detele SPARQL clause"

4 years agoMerge "profiler: Centralise output responsibility from ProfilerOutputText to Profiler"
jenkins-bot [Thu, 29 Aug 2019 05:25:40 +0000 (05:25 +0000)]
Merge "profiler: Centralise output responsibility from ProfilerOutputText to Profiler"

4 years agoMerge "mediawiki.Uri: Add another test for arrayParams"
jenkins-bot [Thu, 29 Aug 2019 03:19:42 +0000 (03:19 +0000)]
Merge "mediawiki.Uri: Add another test for arrayParams"

4 years agomediawiki.Uri: Add another test for arrayParams
Bartosz Dziewoński [Wed, 28 Aug 2019 12:17:13 +0000 (14:17 +0200)]
mediawiki.Uri: Add another test for arrayParams

Verify that the added handling is correctly conditional.

Bug: T231382
Change-Id: I71b834c1c0a7bdaf28d990eafd4ce5d70a55e141

4 years agoMerge "Special:NewFiles: Use a proper user widget instead"
jenkins-bot [Wed, 28 Aug 2019 20:57:14 +0000 (20:57 +0000)]
Merge "Special:NewFiles: Use a proper user widget instead"

4 years agoMerge "resourceloader: Purge localStorage blob if last written 30+ days ago"
jenkins-bot [Wed, 28 Aug 2019 20:57:07 +0000 (20:57 +0000)]
Merge "resourceloader: Purge localStorage blob if last written 30+ days ago"

4 years agoMerge "Pagers: Drop 'newbie' feature"
jenkins-bot [Wed, 28 Aug 2019 20:43:44 +0000 (20:43 +0000)]
Merge "Pagers: Drop 'newbie' feature"

4 years agoMerge "Fix call to non-existing TempFSFileFactory::getTempFSFile()"
jenkins-bot [Wed, 28 Aug 2019 20:09:58 +0000 (20:09 +0000)]
Merge "Fix call to non-existing TempFSFileFactory::getTempFSFile()"

4 years agoMerge "Special:DeletedContributions: Drop 'newbies' feature"
Jforrester [Wed, 28 Aug 2019 19:23:51 +0000 (19:23 +0000)]
Merge "Special:DeletedContributions: Drop 'newbies' feature"

4 years agoFix call to non-existing TempFSFileFactory::getTempFSFile()
daniel [Wed, 28 Aug 2019 19:08:58 +0000 (21:08 +0200)]
Fix call to non-existing TempFSFileFactory::getTempFSFile()

Should be TempFSFileFactory::newTempFSFile()

Bug: T231488
Change-Id: I9fbf7d993773f55965268ac10b347110148671c9

4 years agoMerge "Fix typo in comment"
jenkins-bot [Wed, 28 Aug 2019 18:51:41 +0000 (18:51 +0000)]
Merge "Fix typo in comment"

4 years agoMerge "Make WantedQueryPage::makeWlhLink protected"
jenkins-bot [Wed, 28 Aug 2019 18:46:51 +0000 (18:46 +0000)]
Merge "Make WantedQueryPage::makeWlhLink protected"

4 years agoMerge "PermissionManager should not cache anonymous rights under ID 0"
jenkins-bot [Wed, 28 Aug 2019 18:21:37 +0000 (18:21 +0000)]
Merge "PermissionManager should not cache anonymous rights under ID 0"

4 years agoSpecial:NewFiles: Use a proper user widget instead
James D. Forrester [Fri, 2 Aug 2019 19:34:44 +0000 (12:34 -0700)]
Special:NewFiles: Use a proper user widget instead

Change-Id: I276f55e9d4dd2d539dae232c7a4c1e71745a6168

4 years agoPagers: Drop 'newbie' feature
James D. Forrester [Fri, 2 Aug 2019 19:33:56 +0000 (12:33 -0700)]
Pagers: Drop 'newbie' feature

Change-Id: I14c4da7b107aa9c712bd81522021ae7ecaf2b790

4 years agoSpecial:DeletedContributions: Drop 'newbies' feature
James D. Forrester [Tue, 27 Aug 2019 20:41:00 +0000 (13:41 -0700)]
Special:DeletedContributions: Drop 'newbies' feature

Change-Id: I32c67fb19f50f3949ffe981488c009c82a244999

4 years agoMerge "Sync up with Parsoid parserTests.txt"
jenkins-bot [Wed, 28 Aug 2019 17:41:39 +0000 (17:41 +0000)]
Merge "Sync up with Parsoid parserTests.txt"

4 years agoMerge "Remove unused localisation message 'wlshowlast'"
jenkins-bot [Wed, 28 Aug 2019 17:34:58 +0000 (17:34 +0000)]
Merge "Remove unused localisation message 'wlshowlast'"

4 years agoMerge "Remove unused localisation messages 'ascending_abbrev', 'descending_abbrev'"
jenkins-bot [Wed, 28 Aug 2019 17:33:48 +0000 (17:33 +0000)]
Merge "Remove unused localisation messages 'ascending_abbrev', 'descending_abbrev'"

4 years agoMerge "Upstream "pulsating dot" widget from VE"
jenkins-bot [Wed, 28 Aug 2019 17:23:53 +0000 (17:23 +0000)]
Merge "Upstream "pulsating dot" widget from VE"

4 years agoMake WantedQueryPage::makeWlhLink protected
Ostrzyciel [Wed, 28 Aug 2019 17:12:36 +0000 (19:12 +0200)]
Make WantedQueryPage::makeWlhLink protected

Bug: T231481
Change-Id: I6ace1bb99879ec8256b29f86220e8fc2e785f593

4 years agoMerge "Integration tests for FileBackendGroup"
jenkins-bot [Wed, 28 Aug 2019 17:09:44 +0000 (17:09 +0000)]
Merge "Integration tests for FileBackendGroup"

4 years agoMerge "Grunt: Expand js{,on} for readability"
jenkins-bot [Wed, 28 Aug 2019 17:04:44 +0000 (17:04 +0000)]
Merge "Grunt: Expand js{,on} for readability"

4 years agoPermissionManager should not cache anonymous rights under ID 0
Petr Pchelko [Tue, 20 Aug 2019 20:59:49 +0000 (13:59 -0700)]
PermissionManager should not cache anonymous rights under ID 0

Bug: T228253
Change-Id: I8a54830842f220ff1ac4402a3380c2229a99b619

4 years agoprofiler: Centralise output responsibility from ProfilerOutputText to Profiler
Timo Tijhof [Wed, 28 Aug 2019 00:41:42 +0000 (01:41 +0100)]
profiler: Centralise output responsibility from ProfilerOutputText to Profiler

Make it Profiler.php's responsibility to enforce this, based on the
existing signal from ProfilerOutput::logsToOutput().

The ProfilerOutputText class should not have to double-check this
a second time.

Long-term, I'd like even this check in Profiler::logDataPageOutputOnly
to be removed, because really the external caller of that should
know whether it is safe to output stuff or not rather than stashing
its own state inside Profiler::$allowOutput and then implicitly
reading it back out again later on. But, that's for another time.

Also:
* Remove use of deprecated Profiler::setTemplated while at it.
* Make 'visible' parameter explicit, as for other parameters.

Change-Id: Iaa3fc4ea25a059b90235d769db60c04b8f152f05

4 years agoSync up with Parsoid parserTests.txt
Arlo Breault [Wed, 28 Aug 2019 16:05:09 +0000 (12:05 -0400)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 06a41a99d7811a361446b894da7c5c8224398ad1

Change-Id: I9d324b3e6e9167683c15b7fee2a53b598d79a67c

4 years agoDocs: Standardise "messages used" comments
Ed Sanders [Wed, 28 Aug 2019 15:41:47 +0000 (16:41 +0100)]
Docs: Standardise "messages used" comments

Change-Id: Ie99f8a62da734956863b1e1c41c8768f0e083fed

4 years agoGrunt: Expand js{,on} for readability
Ed Sanders [Wed, 28 Aug 2019 15:40:08 +0000 (16:40 +0100)]
Grunt: Expand js{,on} for readability

Change-Id: Ib3bfb1a9d6547e1062ea3ad08de7ea721c111586

4 years agoMerge "ApiFeedContributions: Drop 'newbies' feature"
jenkins-bot [Wed, 28 Aug 2019 15:25:51 +0000 (15:25 +0000)]
Merge "ApiFeedContributions: Drop 'newbies' feature"

4 years agoApiFeedContributions: Drop 'newbies' feature
James D. Forrester [Tue, 27 Aug 2019 20:40:40 +0000 (13:40 -0700)]
ApiFeedContributions: Drop 'newbies' feature

It has been broken since 2011 (r100315), so no need for
deprecation.

Change-Id: I099f52211c8ce401d827405cb313e1d3932b92f8

4 years agoMerge "skins: Skin::getSkinNameMessages() method is now deprecated"
jenkins-bot [Wed, 28 Aug 2019 12:56:25 +0000 (12:56 +0000)]
Merge "skins: Skin::getSkinNameMessages() method is now deprecated"

4 years agoMerge "skins: Remove use of deprecated MessageCache::singleton()"
jenkins-bot [Wed, 28 Aug 2019 12:56:19 +0000 (12:56 +0000)]
Merge "skins: Remove use of deprecated MessageCache::singleton()"

4 years agoRemove unused localisation message 'wlshowlast'
Bartosz Dziewoński [Wed, 28 Aug 2019 10:51:44 +0000 (12:51 +0200)]
Remove unused localisation message 'wlshowlast'

Not used since 34a3efd5f75ca25f1b8b3b3a2efd13bfb1f7c631.

Note that a similar message 'rclinks' is still used.

Bug: T224429
Change-Id: I471a6a88b838bd7f1fab34c531c556e8ccd2779a

4 years agoRemove unused localisation messages 'ascending_abbrev', 'descending_abbrev'
Bartosz Dziewoński [Wed, 28 Aug 2019 10:47:24 +0000 (12:47 +0200)]
Remove unused localisation messages 'ascending_abbrev', 'descending_abbrev'

Not used since 987a860df428e3c70fd81c404f1f7a300345dc48.

The messages 'sort-descending', 'sort-ascending' serve the same purpose.

Bug: T224429
Change-Id: Iabcf83c80aa3fc387ea908868838b73254765a82

4 years agoRe-add missing messages in languages/i18n/exif/qqq.json
Bartosz Dziewoński [Wed, 28 Aug 2019 11:47:03 +0000 (13:47 +0200)]
Re-add missing messages in languages/i18n/exif/qqq.json

Added in 7c68604e4c5e3f61884d529a37a2878c3155d343, incorrectly removed
by translation updater in 7881d44f690cc1e7415bb6cbaedc02d586a64498?
Checks are failing because of this.

Change-Id: I264f0f1cf3dcd69bbf8d43ad057a81e3f39ed623

4 years agoMerge "Localisation updates from https://translatewiki.net."
D3r1ck01 [Wed, 28 Aug 2019 09:46:06 +0000 (09:46 +0000)]
Merge "Localisation updates from https://translatewiki.net."

4 years agoMerge "Move Title::isNamespaceProtected() to PermissionManager."
jenkins-bot [Wed, 28 Aug 2019 09:19:14 +0000 (09:19 +0000)]
Merge "Move Title::isNamespaceProtected() to PermissionManager."

4 years agoMerge "Fix entites typos"
jenkins-bot [Wed, 28 Aug 2019 09:02:59 +0000 (09:02 +0000)]
Merge "Fix entites typos"

4 years agoMerge "LockManagerGroup tweaks"
jenkins-bot [Wed, 28 Aug 2019 08:44:18 +0000 (08:44 +0000)]
Merge "LockManagerGroup tweaks"

4 years agoMerge "profiler: Rename Profile::setTemplated to Profile::setAllowOutput"
jenkins-bot [Wed, 28 Aug 2019 08:44:12 +0000 (08:44 +0000)]
Merge "profiler: Rename Profile::setTemplated to Profile::setAllowOutput"

4 years agoMerge "Document that img_description_id is a comment id"
jenkins-bot [Wed, 28 Aug 2019 08:32:06 +0000 (08:32 +0000)]
Merge "Document that img_description_id is a comment id"

4 years agoIntegration tests for FileBackendGroup
Aryeh Gregor [Wed, 21 Aug 2019 13:16:27 +0000 (16:16 +0300)]
Integration tests for FileBackendGroup

100% coverage except for one bit of the code that I didn't understand.
Unit tests to come, together with rewrite as a service.

Change-Id: Ib01758d994a9e5587a4fcb5edc3d80010ef05615

4 years agoLockManagerGroup tweaks
Aryeh Gregor [Thu, 15 Aug 2019 18:07:36 +0000 (21:07 +0300)]
LockManagerGroup tweaks

One small change that was supposed to be in 5a6c18a0863 but didn't make
it into the patch version that got merged, and removal of some long-dead
code.

phan objected to the use of new $class without being explicitly
reassured that $class is, in fact, a string. I don't know why.

Change-Id: Ifa00c59ab4464109414f21db37e3a6db21decdf3

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 28 Aug 2019 07:31:09 +0000 (09:31 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8380b27a31ae89200aa7e7ccf38424acb244e288

4 years agoFix typo in comment
Niklas Laxström [Wed, 28 Aug 2019 07:13:26 +0000 (09:13 +0200)]
Fix typo in comment

Change-Id: Iebb57a49156f4efc6f45079d239eef2464c0f554

4 years agoMerge "Let Html::element do the HTML encoding"
jenkins-bot [Wed, 28 Aug 2019 06:57:34 +0000 (06:57 +0000)]
Merge "Let Html::element do the HTML encoding"

4 years agoMerge "parserTests: Add parser test with filename containing single quotes"
jenkins-bot [Wed, 28 Aug 2019 06:57:28 +0000 (06:57 +0000)]
Merge "parserTests: Add parser test with filename containing single quotes"

4 years agoFix entites typos
Zoranzoki21 [Wed, 28 Aug 2019 04:36:04 +0000 (06:36 +0200)]
Fix entites typos

Bug: T201491
Change-Id: I241fda87b0e53e804f6bdd48eb975a79e9f176d2

4 years agoMerge "Revert actor changes to populateLogSearch.php"
jenkins-bot [Wed, 28 Aug 2019 04:29:38 +0000 (04:29 +0000)]
Merge "Revert actor changes to populateLogSearch.php"

4 years agoMerge "MessageCache: Add STRAIGHT_JOIN to avoid planner oddness"
jenkins-bot [Wed, 28 Aug 2019 04:29:31 +0000 (04:29 +0000)]
Merge "MessageCache: Add STRAIGHT_JOIN to avoid planner oddness"

4 years agoMerge "resources: Also add jQuery Migrate to foreign-resources.yaml"
jenkins-bot [Wed, 28 Aug 2019 01:11:43 +0000 (01:11 +0000)]
Merge "resources: Also add jQuery Migrate to foreign-resources.yaml"

4 years agoprofiler: Rename Profile::setTemplated to Profile::setAllowOutput
Timo Tijhof [Wed, 28 Aug 2019 00:20:47 +0000 (01:20 +0100)]
profiler: Rename Profile::setTemplated to Profile::setAllowOutput

This is set from three places:
1) SkinTemplate.php, 2) Maintenance.php, and 3) load.php.

These last two are very much *not* HTML-templated output.
Rename these this method pair to getAllowOutput/setAllowOutput instead,
which is less confusing going forward. No known callers outside of
core (updated in the next commit), but I'll keep compat for one
release cycle just in case.

Change-Id: I828f95332dca3c6766b2b485ffb71762542b42d7

4 years agoMerge "Follow-up 225b462: Remove 'apisandbox-api-disabled' i18n too"
jenkins-bot [Tue, 27 Aug 2019 23:28:10 +0000 (23:28 +0000)]
Merge "Follow-up 225b462: Remove 'apisandbox-api-disabled' i18n too"

4 years agoFix categories detele SPARQL clause
Stanislav Malyshev [Tue, 27 Aug 2019 23:18:30 +0000 (16:18 -0700)]
Fix categories detele SPARQL clause

Bug: T228348
Change-Id: I87b3b5831e31dc619b5eefb7854d3223acd605fc

4 years agoMessageCache: Increase APC 'messages-big' expiry from 1min to 1h
Timo Tijhof [Tue, 27 Aug 2019 15:51:54 +0000 (16:51 +0100)]
MessageCache: Increase APC 'messages-big' expiry from 1min to 1h

Bug: T218207
Change-Id: Ic5d2a556912e2a16ee899eec3a0670f00dec9a8c

4 years agoMerge "mw.Uri: Add support for array parameters with explicit indexes"
jenkins-bot [Tue, 27 Aug 2019 22:48:04 +0000 (22:48 +0000)]
Merge "mw.Uri: Add support for array parameters with explicit indexes"

4 years agoFollow-up 225b462: Remove 'apisandbox-api-disabled' i18n too
James D. Forrester [Tue, 27 Aug 2019 22:47:18 +0000 (15:47 -0700)]
Follow-up 225b462: Remove 'apisandbox-api-disabled' i18n too

Initially removed, lost in rebase.

Bug: T224429
Change-Id: Ibb9c0ab1dcd2b3119cda570552d54ff866677d95

4 years agoskins: Skin::getSkinNameMessages() method is now deprecated
Derick Alangi [Tue, 27 Aug 2019 22:04:22 +0000 (23:04 +0100)]
skins: Skin::getSkinNameMessages() method is now deprecated

No longer used per CS below;
https://codesearch.wmflabs.org/search/?q=getSkinNameMessages&i=nope&files=&repos=

Change-Id: I2be9f417444024c3612db3e771a385ce5ed12ec4

4 years agoskins: Remove use of deprecated MessageCache::singleton()
Derick Alangi [Tue, 27 Aug 2019 22:01:04 +0000 (23:01 +0100)]
skins: Remove use of deprecated MessageCache::singleton()

Change-Id: I1c6d3874dd78023d743a418039c23adb55578f98

4 years agoMerge "Recognize exif values for Apple iOS photo modes"
jenkins-bot [Tue, 27 Aug 2019 22:21:57 +0000 (22:21 +0000)]
Merge "Recognize exif values for Apple iOS photo modes"

4 years agomw.Uri: Add support for array parameters with explicit indexes
Bartosz Dziewoński [Tue, 27 Aug 2019 20:14:01 +0000 (22:14 +0200)]
mw.Uri: Add support for array parameters with explicit indexes

When the new 'arrayParams' option is set, query strings like
`&foo[0]=a&foo[1]=b` will be parsed as a single parameter `foo`
containing an array, rather than two separate parameters.

The new option also affects the behavior of array parameters like
`&foo[]=a&foo[]=b`, which will be parsed as a parameter named `foo`
rather than `foo[]`, and disables array handling for parameters that
don't contain an array index at the end.

Unlike in PHP, this does not handle associative or multi-dimensional
arrays, but that may be improved in the future.

Bug: T231382
Change-Id: I48d4bb3fdf0ea7f5eb133c59bf63651ba356fc42

4 years agoRevert "Output more MW version info in update.php"
Reedy [Tue, 27 Aug 2019 07:40:29 +0000 (08:40 +0100)]
Revert "Output more MW version info in update.php"

Left changes to SpecialVersion.php

This reverts commit e73328601d51674e8fef89c3db12b30ceafd702f.

Bug: T227489
Change-Id: I673b6a6abb73e93d2253fc554f94ef9c833dae0c

4 years agoRecognize exif values for Apple iOS photo modes
Derk-Jan Hartman [Tue, 27 Aug 2019 20:31:43 +0000 (22:31 +0200)]
Recognize exif values for Apple iOS photo modes

CustomRendered value 2-8 are used by Apple to indicate the processing
modes used like HDR, Portrait and Panorama.

Bug: T231385
Change-Id: I767a81a8bebdf25c230b104d35236a4b38cbe4ed

4 years agoresourceloader: Purge localStorage blob if last written 30+ days ago
Timo Tijhof [Tue, 6 Aug 2019 00:12:39 +0000 (01:12 +0100)]
resourceloader: Purge localStorage blob if last written 30+ days ago

Our version hashes are 6-7 chars of base36 from a fnv132 digest.
Using the formula of <https://en.wikipedia.org/wiki/Birthday_attack>
that provides enough range to publish 2087 different versions of
a given module before there is a 0.1% probability to clash with
another version, 660 versions for a 0.01% probability, and
209 versions of a 0.001% probability.

I think 200 versions of a single module is a good enough space
for most use cases we have of the version hash (such as the E-Tag
header for browser caches and HTTP proxies, whic have have a 30-day
TTL).

However, for mw.loader.store it's a bit tricky. It's generally
more than enough given that (unlike HTTP caches) we only store
1 version of any given module so we don't need it to be different
from N different versions, just the last one.

But, also unlike HTTP caches, localStorage has no expiry. This means
that while for a single user it only has to be different from their
last-seen version, but from the server perspective, it needs to be
different from all possible versions a given user may have last seen.
This is problematic and effectively unbounded.

Plug this hole by discarding the localStorage value and starting
fresh, if the user last visited the site more than 30 days ago.

This is also in preparation for T229245, which will reduce the
hash from 6-7 chars to 5 chars. With that size, we can support only
348 different versions at a 0.1% probability (instead of 2087).
Which is fine for the bounded use cases with a TTL, but would make
the unbounded nature of localStorage even more problematic.

Bug: T229245
Change-Id: Iba8cdbebf1bb5c7c628832708fd656fcef61c095

4 years agoMerge "Special:NewFiles: Drop 'newbies' feature"
jenkins-bot [Tue, 27 Aug 2019 19:49:54 +0000 (19:49 +0000)]
Merge "Special:NewFiles: Drop 'newbies' feature"

4 years agoMerge "Special:Contributions: Drop 'newbies' feature"
jenkins-bot [Tue, 27 Aug 2019 19:45:27 +0000 (19:45 +0000)]
Merge "Special:Contributions: Drop 'newbies' feature"

4 years agoSpecial:NewFiles: Drop 'newbies' feature
James D. Forrester [Fri, 2 Aug 2019 19:32:23 +0000 (12:32 -0700)]
Special:NewFiles: Drop 'newbies' feature

Change-Id: I946d7027db0fec90d8af68f9370fdd7fe5fd61e0

4 years agoSpecial:Contributions: Drop 'newbies' feature
James D. Forrester [Fri, 2 Aug 2019 19:06:31 +0000 (12:06 -0700)]
Special:Contributions: Drop 'newbies' feature

This old, low-value feature has been replaced by the much more featureful
functionality on RecentChanges, which has the added advantage of using an
efficient query.

Bug: T220447
Change-Id: I2e6e12b2ad627ecc346883878811ec0164cd03da

4 years agoMerge "WebStart: Avoid DB or uselang for nonwrite-api-promise-error message"
jenkins-bot [Tue, 27 Aug 2019 18:35:09 +0000 (18:35 +0000)]
Merge "WebStart: Avoid DB or uselang for nonwrite-api-promise-error message"

4 years agoMerge "MessageCache: Remove $wgMsgCacheExpiry configuration var"
jenkins-bot [Tue, 27 Aug 2019 18:33:05 +0000 (18:33 +0000)]
Merge "MessageCache: Remove $wgMsgCacheExpiry configuration var"

4 years agoMerge "MessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access"
jenkins-bot [Tue, 27 Aug 2019 18:31:18 +0000 (18:31 +0000)]
Merge "MessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access"

4 years agoMerge "BadFileLookup::isBadFile() expects null, not false"
jenkins-bot [Tue, 27 Aug 2019 18:25:54 +0000 (18:25 +0000)]
Merge "BadFileLookup::isBadFile() expects null, not false"

4 years agobuild: Upgrade eslint-utils dependency from 1.3.1 to 1.4.2 for security issues
James D. Forrester [Tue, 27 Aug 2019 18:02:40 +0000 (11:02 -0700)]
build: Upgrade eslint-utils dependency from 1.3.1 to 1.4.2 for security issues

Change-Id: I70f6798eb6e42cf685d03622d4420509fc1bc236

4 years agoBadFileLookup::isBadFile() expects null, not false
Aryeh Gregor [Tue, 27 Aug 2019 17:21:28 +0000 (20:21 +0300)]
BadFileLookup::isBadFile() expects null, not false

This deviation in behavior from wfIsBadImage() is accounted for in that
function, but I didn't account for it when changing callers to use the
service.

Bug: T231340
Bug: T231353
Change-Id: Iddf177770fb1763ed295d694ed6bab441ea9ab73

4 years agoMessageCache: Remove $wgMsgCacheExpiry configuration var
Timo Tijhof [Tue, 27 Aug 2019 15:35:49 +0000 (16:35 +0100)]
MessageCache: Remove $wgMsgCacheExpiry configuration var

This variable has never been set to anything other than the default value of
24 hours as introduced in 2003 (r2203, r2204; or 036ff960ceedf6b38626).

The variable has never changed in core, it's not overridden at WMF,
and MessageCache is not constructed anywhere other than ServiceWiring.php
anywhere in repos on Wikimedia Gerrit, indexed by MediaWiki Codesearch,
or any GitHub-hosted repository (incl Wikia repos and WikiHow mirrors).

I've also checked all GitHub-hosted repos for boilerplates and/or public
settings files from devs or prod, and couldn't find any example of
this being overridden (after filtering out copies of the core files
themselves). Rather than having to support potentially hard-to-predict
interactions betweeen caching layers by checking its state, make it
a constant so we can code reason about it more easily.

Change-Id: Ie2e139001aae3ac54b509d94a3d917bb408eaca0

4 years agoMerge "Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist"
jenkins-bot [Tue, 27 Aug 2019 17:23:05 +0000 (17:23 +0000)]
Merge "Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist"

4 years agoMerge "Restore some previous constructor calls"
jenkins-bot [Tue, 27 Aug 2019 17:04:14 +0000 (17:04 +0000)]
Merge "Restore some previous constructor calls"

4 years agoRemove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist
Reedy [Tue, 27 Aug 2019 16:53:27 +0000 (17:53 +0100)]
Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist

It's causing quite a bit of WMF log spam because it's still used in wmf-config

Partial revert of I4c90e361b7538efeb0c5efa7ca61aed2e468591c

Change-Id: I7d1282e4260e7a42bee35b81d77470eb40dea818

4 years agoMerge "Avoid PHP warning due to bogus second tideways_xhprof_enable() argument"
jenkins-bot [Tue, 27 Aug 2019 16:29:10 +0000 (16:29 +0000)]
Merge "Avoid PHP warning due to bogus second tideways_xhprof_enable() argument"

4 years agoMessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access
Timo Tijhof [Tue, 27 Aug 2019 15:26:20 +0000 (16:26 +0100)]
MessageCache: Minor wgMsgCacheExpiry doc fix, and clear constant access

The class used is typed against BagOStuff so access the constant
from there instead.

Bug: T218207
Change-Id: Ie22d6aa5877fb5e8e2ae0b3be87f4b28f45ad763

4 years agoMerge "rdbms: remove unused $fulltextEnabled field from DatabaseSqlite"
jenkins-bot [Tue, 27 Aug 2019 16:21:21 +0000 (16:21 +0000)]
Merge "rdbms: remove unused $fulltextEnabled field from DatabaseSqlite"

4 years agoMerge "Hard deprecate new SearchResult() and introduce RevisionSearchResult"
jenkins-bot [Tue, 27 Aug 2019 15:53:34 +0000 (15:53 +0000)]
Merge "Hard deprecate new SearchResult() and introduce RevisionSearchResult"

4 years agoMerge "LockManagerGroupFactory to replace singletons"
jenkins-bot [Tue, 27 Aug 2019 15:41:15 +0000 (15:41 +0000)]
Merge "LockManagerGroupFactory to replace singletons"

4 years agoMerge "Use correct metadata when adding exact query match"
jenkins-bot [Tue, 27 Aug 2019 15:34:43 +0000 (15:34 +0000)]
Merge "Use correct metadata when adding exact query match"

4 years agoHard deprecate new SearchResult() and introduce RevisionSearchResult
David Causse [Thu, 1 Aug 2019 20:38:46 +0000 (22:38 +0200)]
Hard deprecate new SearchResult() and introduce RevisionSearchResult

Transitional step for the transformation of SearchResult into an
abstract base class:
- RevisionSearchResult is introduced to behave like SearchResult
- methods are currently shared between  RevisionSearchResult and
  SearchResult in the RevisionSearchResultTrait

Bug: T228626
Change-Id: I13d132de50f6c66086b7f9055d036f2e76667b27

4 years agoMerge "mail: Avoid use of global state and use MediaWiki services DI"
jenkins-bot [Tue, 27 Aug 2019 15:26:47 +0000 (15:26 +0000)]
Merge "mail: Avoid use of global state and use MediaWiki services DI"

4 years agoMerge "Use UserIdentity::isRegistered instead of User::isAnon in BlockManager"
jenkins-bot [Tue, 27 Aug 2019 15:22:40 +0000 (15:22 +0000)]
Merge "Use UserIdentity::isRegistered instead of User::isAnon in BlockManager"

4 years agoMerge "Use ->getTitle() instead of ->mTitle to get the title from Parser"
jenkins-bot [Tue, 27 Aug 2019 14:30:12 +0000 (14:30 +0000)]
Merge "Use ->getTitle() instead of ->mTitle to get the title from Parser"

4 years agomail: Avoid use of global state and use MediaWiki services DI
Derick Alangi [Mon, 26 Aug 2019 13:03:35 +0000 (14:03 +0100)]
mail: Avoid use of global state and use MediaWiki services DI

Change-Id: If335cb6a220ebc5eb7487e51ee097f9d2afa0d2d