lhc/web/wiklou.git
5 years agoresourceloader: Remove ResourceLoaderMaxQueryLength from mw.config
Timo Tijhof [Wed, 6 Mar 2019 15:46:44 +0000 (15:46 +0000)]
resourceloader: Remove ResourceLoaderMaxQueryLength from mw.config

This is only used internally. It doesn't need to be exported
as part of mw.config.

Change-Id: If4206d797b5d426eb999c34ad5dde3ba141c6f05

5 years agoresourceloader: Use local var for getConfig() calls in StartUpModule
Timo Tijhof [Wed, 6 Mar 2019 15:45:55 +0000 (15:45 +0000)]
resourceloader: Use local var for getConfig() calls in StartUpModule

Change-Id: I53af241454872fd228869b45dc74175c56026d6e

5 years agoMerge "Hard deprecate MWNamespace::canTalk()"
jenkins-bot [Wed, 6 Mar 2019 15:11:07 +0000 (15:11 +0000)]
Merge "Hard deprecate MWNamespace::canTalk()"

5 years agoMerge "user_group, the nonexistent table that keeps on giving"
jenkins-bot [Wed, 6 Mar 2019 09:58:52 +0000 (09:58 +0000)]
Merge "user_group, the nonexistent table that keeps on giving"

5 years agouser_group, the nonexistent table that keeps on giving
Jack Phoenix [Wed, 6 Mar 2019 09:07:26 +0000 (11:07 +0200)]
user_group, the nonexistent table that keeps on giving

Follow-up to 27c61fb1e94da9114314468fd00bcf129ec064b6.

Bug: T199474

Change-Id: Ie8e054f5898209c51538669149e966bee7754f1e

5 years agoRevert "Convert MultiHttpClient to use Guzzle"
Antoine Musso [Wed, 6 Mar 2019 08:52:34 +0000 (08:52 +0000)]
Revert "Convert MultiHttpClient to use Guzzle"

That breaks on Wikimedia beta cluster (T217733):

Warning: Invalid argument: option: 6 in
vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 56

Warning: Invalid argument: option: 6 in
vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 56

Warning: Invalid argument: function: not string, closure, or array in
vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php on line 108

Fatal error: Uncaught exception 'ConfigException'
Failed to load configuration from etcd: cURL error 23: Failed writing
header

This reverts commit 1e048a08b565ae909e85465f8b09a27ed8480ce2.

Bug: T202352
Bug: T217733
Change-Id: I2384355043896128d3f191941e8da00fdc62361e

5 years agoMerge "resourceloader: Minor clean up in saveFileDependencies()"
jenkins-bot [Wed, 6 Mar 2019 04:25:11 +0000 (04:25 +0000)]
Merge "resourceloader: Minor clean up in saveFileDependencies()"

5 years agoresourceloader: Minor clean up in saveFileDependencies()
Timo Tijhof [Wed, 6 Mar 2019 01:35:05 +0000 (01:35 +0000)]
resourceloader: Minor clean up in saveFileDependencies()

* Use early return instead of all-encapsulating conditional.

* Document why the try/catch is so big.

Change-Id: Ie19e18556e7ac0a12ad6b979367f8c6b786bbe31

5 years agoMerge "Fix a rather fatal typo in rebuildrecentchanges.php"
jenkins-bot [Tue, 5 Mar 2019 23:38:56 +0000 (23:38 +0000)]
Merge "Fix a rather fatal typo in rebuildrecentchanges.php"

5 years agoMerge "API: Avoid duplicate logs to api-feature-usage"
jenkins-bot [Tue, 5 Mar 2019 23:14:19 +0000 (23:14 +0000)]
Merge "API: Avoid duplicate logs to api-feature-usage"

5 years agoFix a rather fatal typo in rebuildrecentchanges.php
Jack Phoenix [Tue, 5 Mar 2019 23:13:59 +0000 (01:13 +0200)]
Fix a rather fatal typo in rebuildrecentchanges.php

The JOIN condition was being ignored because there is no table called "user_group" in MediaWiki core.
Thus if and when using $wgSharedDB, the query would end up listing *all* registered users from the shared user table.
And even without $wgSharedDB, running rebuildrecentchanges.php would result in everyone's edits being marked as bot edits (recentchanges.rc_bot = 1) and thus hidden from the Special:RecentChanges page.

Thanks to Lcawte for reporting this bug.

Follow-up to 27c61fb1e94da9114314468fd00bcf129ec064b6

Change-Id: I18d658b67c50f2200341f732783c2e7524dd27f1

5 years agoMerge "Block Special pages only if the user is sitewide blocked"
jenkins-bot [Tue, 5 Mar 2019 23:03:49 +0000 (23:03 +0000)]
Merge "Block Special pages only if the user is sitewide blocked"

5 years agoAPI: Avoid duplicate logs to api-feature-usage
Brad Jorsch [Tue, 5 Mar 2019 22:43:16 +0000 (17:43 -0500)]
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

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

Change-Id: I82b2f9fbde2a8c7524bd2de7ee207c829941a2cf

5 years agoMerge "Clear cached HTML artifacts"
jenkins-bot [Tue, 5 Mar 2019 20:34:53 +0000 (20:34 +0000)]
Merge "Clear cached HTML artifacts"

5 years agoMerge "Convert MultiHttpClient to use Guzzle"
jenkins-bot [Tue, 5 Mar 2019 19:58:48 +0000 (19:58 +0000)]
Merge "Convert MultiHttpClient to use Guzzle"

5 years agoMerge "resources: Provide the moment gom-Latn i18n to gom as well"
jenkins-bot [Tue, 5 Mar 2019 19:57:37 +0000 (19:57 +0000)]
Merge "resources: Provide the moment gom-Latn i18n to gom as well"

5 years agoMerge "Specify licence of mediawiki ontology.owl"
jenkins-bot [Tue, 5 Mar 2019 19:45:10 +0000 (19:45 +0000)]
Merge "Specify licence of mediawiki ontology.owl"

5 years agoConvert MultiHttpClient to use Guzzle
Bill Pirkle [Tue, 21 Aug 2018 18:54:43 +0000 (13:54 -0500)]
Convert MultiHttpClient to use Guzzle

Convert MultiHttpClient to use the Guzzle library.
Guzzle includes built-in support for concurrency, and automatic
fallback to php streams if curl is unavailable.

Bug: T202352
Change-Id: I703af901f9da33d20b5e0989941f3f7fd6609298

5 years agoMerge "resourceloader: Remove addModuleScripts, and deprecate getModuleScripts."
jenkins-bot [Tue, 5 Mar 2019 18:54:38 +0000 (18:54 +0000)]
Merge "resourceloader: Remove addModuleScripts, and deprecate getModuleScripts."

5 years agoresourceloader: Remove addModuleScripts, and deprecate getModuleScripts.
Timo Tijhof [Sun, 3 Mar 2019 19:19:51 +0000 (19:19 +0000)]
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

5 years agoresources: Provide the moment gom-Latn i18n to gom as well
James D. Forrester [Tue, 5 Mar 2019 16:00:38 +0000 (16:00 +0000)]
resources: Provide the moment gom-Latn i18n to gom as well

Bug: T191339
Change-Id: Icf7556a1fa71e12dd1029765f81914a36a3c1c22

5 years agoMerge "objectcache: optimize WAN cache key updates during HOLDOFF_TTL"
jenkins-bot [Tue, 5 Mar 2019 13:26:44 +0000 (13:26 +0000)]
Merge "objectcache: optimize WAN cache key updates during HOLDOFF_TTL"

5 years agoMerge "Remove references to obsolete special page and messages"
jenkins-bot [Tue, 5 Mar 2019 12:37:47 +0000 (12:37 +0000)]
Merge "Remove references to obsolete special page and messages"

5 years agoMerge "Various small code and comment cleanups to IndexPager"
jenkins-bot [Tue, 5 Mar 2019 12:26:18 +0000 (12:26 +0000)]
Merge "Various small code and comment cleanups to IndexPager"

5 years agoresources: Remove deprecated 'jquery.hidpi' module
Timo Tijhof [Sun, 3 Mar 2019 01:51:50 +0000 (01:51 +0000)]
resources: Remove deprecated 'jquery.hidpi' module

Deprecated in 1.32 and has no further purpose in its current
form as a jQuery plugin for <img srcset>, which we now use
natively without fallback.

The remaining logic for bracketed window.devicePixelRatio is
simple enough to inline as needed without the cruft and overhead
that comes with a centralised approach.

Bug: T202154
Change-Id: I729dfabcbb40a0a794d6b166a584f45a64ac0338

5 years agoMerge "logging: Remove 'null' return from ManualLogEntry::getTags()"
jenkins-bot [Tue, 5 Mar 2019 11:07:04 +0000 (11:07 +0000)]
Merge "logging: Remove 'null' return from ManualLogEntry::getTags()"

5 years agoVarious small code and comment cleanups to IndexPager
Aaron Schulz [Tue, 5 Mar 2019 09:41:55 +0000 (01:41 -0800)]
Various small code and comment cleanups to IndexPager

Change-Id: I351c12d51468bd428207017929fec1e796097206

5 years agoDrop AuthPlugin and related code, deprecated in 1.27
James D. Forrester [Mon, 11 Feb 2019 21:18:13 +0000 (13:18 -0800)]
Drop AuthPlugin and related code, deprecated in 1.27

Bug: T215843
Depends-On: Ie49709faa6f67b0a31bd546823d29dbfea0a70eb
Depends-On: If8109dbfdeeb88a6265f4cd79d1ae81bff48d934
Depends-On: I36b195fa2d6c23a76631ebaf869c787e44427d60
Depends-On: Iaa171b085fde331eab7d85c7de74523e27fc625a
Change-Id: I330b30d6582034a233fed204c0680b1ce84eec6e

5 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Tue, 5 Mar 2019 06:49:20 +0000 (06:49 +0000)]
Merge "Localisation updates from https://translatewiki.net."

5 years agoMerge "Recentchanges: Hide instead of disable namespace selector checkboxes"
jenkins-bot [Mon, 4 Mar 2019 23:22:17 +0000 (23:22 +0000)]
Merge "Recentchanges: Hide instead of disable namespace selector checkboxes"

5 years agoMerge "Set api-request log http.request_headers properly"
Ottomata [Mon, 4 Mar 2019 21:41:55 +0000 (21:41 +0000)]
Merge "Set api-request log http.request_headers properly"

5 years agoSet api-request log http.request_headers properly
Andrew Otto [Mon, 4 Mar 2019 20:47:01 +0000 (15:47 -0500)]
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

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 4 Mar 2019 20:54:19 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: If706f62773b164f4c26a0eedb1e6709971c77b17

5 years agoClear cached HTML artifacts
jdlrobson [Wed, 13 Feb 2019 22:02:00 +0000 (14:02 -0800)]
Clear cached HTML artifacts

Follow up to I6aad563e48f41c783df8b176a4f437e60a1255cc
Can be merged when that patch has been in production for a week.

Change-Id: I9f6b523f3ece055f8e6e45dfbfeb9852bebe4772

5 years agoRemove outdated reference to design.txt
Lucas Werkmeister [Mon, 4 Mar 2019 16:49:42 +0000 (17:49 +0100)]
Remove outdated reference to design.txt

docs/design.txt was removed half a year ago in change I85be15a68f
(commit 6760216e10), and was long outdated even then, so let’s stop
pointing people at it.

Change-Id: I165ff1e12fb79c480930289d25833992be61b891

5 years agoMerge "resourceloader: Remove warning for handled localStorage error"
jenkins-bot [Mon, 4 Mar 2019 16:41:32 +0000 (16:41 +0000)]
Merge "resourceloader: Remove warning for handled localStorage error"

5 years agoBlock Special pages only if the user is sitewide blocked
David Barratt [Thu, 21 Feb 2019 17:54:35 +0000 (12:54 -0500)]
Block Special pages only if the user is sitewide blocked

Update the default implementation of FormSpecialPage::checkExecutePermissions()
so that a Special page is only blocked if the user has a sitewide block.

This change allows the user to continue performing critical functions (like
resetting their password) even if they are partially blocked.

Bug: T209097
Change-Id: I5190297b7b235b6ebbdfa522323ce9bbd46b6729

5 years agoAllows to add subsections to special pages groups on special page "Specialpages"
Karsten Hoffmeyer [Sat, 2 Mar 2019 11:03:49 +0000 (12:03 +0100)]
Allows to add subsections to special pages groups on special page "Specialpages"

Adding all pages into one section creates some inconsistencies where users
cannot clearly distinguish pages. Thus extensions and extension suites like,
e.g. semantic extensions, translation extensions or social profile extensions
can improve the situation.

Bug: T216467
Change-Id: Iddc28e040fe975f8f823c84919fa476d2a13af0a

5 years agoMerge "Document the 'sitewide' option for the Block class"
jenkins-bot [Mon, 4 Mar 2019 15:20:37 +0000 (15:20 +0000)]
Merge "Document the 'sitewide' option for the Block class"

5 years agoSpecify licence of mediawiki ontology.owl
Greta Doçi [Mon, 4 Mar 2019 15:12:13 +0000 (16:12 +0100)]
Specify licence of mediawiki ontology.owl

Bug: T216842
Change-Id: Ide976016bc5d421458cfe4ad661d88bb32da61a6

5 years agoMerge "Fix typo in Priority Hints static variable name"
jenkins-bot [Mon, 4 Mar 2019 13:47:43 +0000 (13:47 +0000)]
Merge "Fix typo in Priority Hints static variable name"

5 years agoMerge "mediawiki.cldr: Move file to its own directory"
jenkins-bot [Mon, 4 Mar 2019 13:45:03 +0000 (13:45 +0000)]
Merge "mediawiki.cldr: Move file to its own directory"

5 years agoobjectcache: optimize WAN cache key updates during HOLDOFF_TTL
Aaron Schulz [Wed, 27 Feb 2019 01:04:24 +0000 (17:04 -0800)]
objectcache: optimize WAN cache key updates during HOLDOFF_TTL

Avoid the ADD operation spam from all threads trying to access
a tombstoned key by checking the interim value cache timestamp.
This also avoids the GET/CAS spam from threads that manage to
get the mutex. If a single thread repeatedly accesses the same
tombstoned value in rapid succession, there will significantly
less cache operation spam.

Do the same for cache updates to keys in the holdoff state
due to "check keys" or the "touchedCallback" function.

Relatedly, fix getWithSetCallback() to disregard interim values
set prior to or at the same time as the latest delete() call.
This can slightly reduce the chance of the cache being behind
replica DBs for a second. It also avoids unit test failures
were a series of deletes and cache access happen at the same
timestamp (via time injection or regular system time calls).

In addition:
* Add PASS_BY_REF flag with backwards compatibility to avoid
  bloating the signature of get()/getMulti() with the new
  tombstone information needed for the above changes.
* Avoid confusing pass-by-reference in getInterimValue() and
  fix use of incorrect $asOf parameter.
* Move some more logic into setInterimValue().
* Update some comments regarding broadcasted operations that
  were not true for the currently assumed mcrouter setup.
* Rename $cValue => $curValue and $versioned => $needsVersion
  for better readability.

Bug: T203786
Change-Id: I0eb3f9b697193d39a70dd3c0967311ad7e194f20

5 years agoFix typo in Priority Hints static variable name
Gilles Dubuc [Mon, 4 Mar 2019 08:46:56 +0000 (09:46 +0100)]
Fix typo in Priority Hints static variable name

Bug: T216499
Change-Id: I444292afd1b8fcc81e7cf204f82ed512f53bcc85

5 years agoMerge "Remove unused method Title::validateFileMoveOperation()"
jenkins-bot [Mon, 4 Mar 2019 05:29:10 +0000 (05:29 +0000)]
Merge "Remove unused method Title::validateFileMoveOperation()"

5 years agoMerge "API: Handle Messages in errorArrayToStatus()"
jenkins-bot [Mon, 4 Mar 2019 05:24:05 +0000 (05:24 +0000)]
Merge "API: Handle Messages in errorArrayToStatus()"

5 years agoRemove unused method Title::validateFileMoveOperation()
Holger Knust [Thu, 28 Feb 2019 20:37:40 +0000 (15:37 -0500)]
Remove unused method Title::validateFileMoveOperation()

This method has never been used and isn't covered by the deprecation
policy since it was protected.

Bug: T214316
Change-Id: I96404792e895f12abec048c62c4b70d86a3d8310

5 years agoMerge "Avoid cached lag logging spam from changes list pages"
jenkins-bot [Mon, 4 Mar 2019 03:54:42 +0000 (03:54 +0000)]
Merge "Avoid cached lag logging spam from changes list pages"

5 years agoMerge "Various fixes to make phan-taint-check happier"
jenkins-bot [Mon, 4 Mar 2019 03:36:32 +0000 (03:36 +0000)]
Merge "Various fixes to make phan-taint-check happier"

5 years agoMerge "Various fixes for phan-taint-check"
jenkins-bot [Mon, 4 Mar 2019 03:24:47 +0000 (03:24 +0000)]
Merge "Various fixes for phan-taint-check"

5 years agoVarious fixes to make phan-taint-check happier
Brian Wolff [Sun, 17 Feb 2019 11:32:50 +0000 (11:32 +0000)]
Various fixes to make phan-taint-check happier

Bug: T216348
Change-Id: If4071e689f476d2138d8964598c5a02b09448677

5 years agoMerge "Use htmlspecialchars() not htmlentities in xml export for validity"
jenkins-bot [Mon, 4 Mar 2019 03:21:26 +0000 (03:21 +0000)]
Merge "Use htmlspecialchars() not htmlentities in xml export for validity"

5 years agoAvoid cached lag logging spam from changes list pages
Aaron Schulz [Mon, 4 Mar 2019 02:32:47 +0000 (18:32 -0800)]
Avoid cached lag logging spam from changes list pages

We do not really care about snapshot lag for these cases, so make
them use the same method that getCacheSetOptions() uses.

Bug: T160833
Change-Id: I238aa48e0cdafb2a7f06cae93642797439f94091

5 years agoVarious fixes for phan-taint-check
Brian Wolff [Sun, 17 Feb 2019 11:45:06 +0000 (11:45 +0000)]
Various fixes for phan-taint-check

Bug: T216348
Change-Id: Id9e7a4704d62457cac9bd1ca6044dec76472e371

5 years agoMerge "Status: Make various improvements to the Status class"
jenkins-bot [Mon, 4 Mar 2019 00:57:40 +0000 (00:57 +0000)]
Merge "Status: Make various improvements to the Status class"

5 years agoStatus: Make various improvements to the Status class
Derick Alangi [Sun, 3 Mar 2019 20:10:12 +0000 (21:10 +0100)]
Status: Make various improvements to the Status class

These improvements touches areas such as;
- strict comparison as count() returns in int.
- use of single quotes for string literals.
- use of RequestContext to get the user's Language object.
- fix minor typo.

The todo for using RequestContext was added in 7c543bb6c25.
It used `$wgLang` at the time for consistency with Message.php,
which was changed in 2016 with 0beb5ca992c. Hence, it's now
fine here as well.

Change-Id: I943dfd761a8fca7e8b6658e3c9510ddc6694f042

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 3 Mar 2019 21:00:41 +0000 (22:00 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I88973d2b1ab48171ec8d909a69540d03ed229a4e

5 years agoMerge "resources: Remove 'jquery.mockjax' module"
jenkins-bot [Sun, 3 Mar 2019 18:18:15 +0000 (18:18 +0000)]
Merge "resources: Remove 'jquery.mockjax' module"

5 years agoresourceloader: Remove warning for handled localStorage error
Timo Tijhof [Sun, 3 Mar 2019 18:11:08 +0000 (18:11 +0000)]
resourceloader: Remove warning for handled localStorage error

Leads to more confusion that actual utility in practice.
The storage being disabled is an entirely supported and expected
scenario, which we handle gracefully.

When wanting to ad-hoc check whether localStorage is enabled,
browsers tend to show that in their interface already (e.g. to
the side of the address bar in Chrome). And it can also be
trivially checked from the console by looking at localStorage
or mw.loader.store.

Bug: T195647
Change-Id: I1edf89e52ec56b4919816878924f096d5b7f7751

5 years agoMove specialpage redirects related classes to own files
Umherirrender [Fri, 8 Feb 2019 18:05:27 +0000 (19:05 +0100)]
Move specialpage redirects related classes to own files

Change-Id: Ibddbb0c4e40fff310b1720ec9c72f2683cc93f54

5 years agomediawiki.cldr: Move file to its own directory
Timo Tijhof [Sun, 3 Mar 2019 17:46:22 +0000 (17:46 +0000)]
mediawiki.cldr: Move file to its own directory

Bug: T193826
Change-Id: I763ce0e8b500a9f499a4fc3f76da036b745a0054

5 years agomaintenance: Remove unused code from several maintenance scripts
Thiemo Kreuz [Thu, 28 Feb 2019 11:04:31 +0000 (12:04 +0100)]
maintenance: Remove unused code from several maintenance scripts

The most notable removal is done in the orphans script. This code was
really never used. Brion introduced it in 2005, already disabled.

I have all the respect for what Brion did. I just think it does not make
much sense to keep code around for so long if it does not work anyway,
and must be rewritten from scratch anyway now that we have multi-content
revisions and such.

Change-Id: I4e8050929f90e44a6e6051bf938993a8b0cdf649

5 years agoMerge "Fix usage of MediaWikiServices in comments and documentation"
jenkins-bot [Sun, 3 Mar 2019 14:36:53 +0000 (14:36 +0000)]
Merge "Fix usage of MediaWikiServices in comments and documentation"

5 years agoFix usage of MediaWikiServices in comments and documentation
Fomafix [Sun, 3 Mar 2019 13:40:58 +0000 (14:40 +0100)]
Fix usage of MediaWikiServices in comments and documentation

MediaWikiServices::getFoo()

is wrong. Right is:

MediaWikiServices::getInstance()->getFoo()

Change-Id: Ib6d844ddfe5bd6ccd72b887a63d9ad476c8d196f

5 years agoinstaller: Replace the use of global $wgParser with services
Derick Alangi [Sun, 3 Mar 2019 12:23:47 +0000 (13:23 +0100)]
installer: Replace the use of global $wgParser with services

global $wgParser was deprecated in 1.32 and services are used
instead to get the parser object via MediaWikiServices. Making
this replacement as we're avoiding globals.

Change-Id: I967a52c481bfcc83552053a03e88acb038810828

5 years agoresources: Remove 'jquery.mockjax' module
Timo Tijhof [Sun, 3 Mar 2019 01:42:58 +0000 (01:42 +0000)]
resources: Remove 'jquery.mockjax' module

Added in r93908 (2011, aa1bc6f742c0) for use by UploadWizard,
but this never happened. Instead, the UploadWizard extension
had its own copy for a awhile, but that isn't used anymore
either.

It's never been updated or seen other maintenance, and is
redundant nowadays with Sinon.

Bug: T202154
Change-Id: Ief4c87ac62efa32dbbfadea3e52bfce5db8bf184

5 years agoresources: Remove 'jquery.xmldom' module
Timo Tijhof [Sun, 3 Mar 2019 01:22:45 +0000 (01:22 +0000)]
resources: Remove 'jquery.xmldom' module

Added in r93908 (2011, aa1bc6f742c0), for use by UploadWizard,
but as far as I can tell this never happened, and it's not
in use currently anywhere in Wikimedia Git or elsewhere indexed
by Codesearch.

It's never been updated or otherwise seen maintenance, and seems
obsolete with native browser features nowadays.

Bug: T202154
Change-Id: I6eccf4f488b6e8d7afa5eb81505895d0729cbfea

5 years agobuild: Add names to Fresnel scenarios
Timo Tijhof [Sun, 3 Mar 2019 01:58:08 +0000 (01:58 +0000)]
build: Add names to Fresnel scenarios

Per T216854, it's now supported to give the scenarios a name.
This way, the Jenkins build will have headings like "scenario View a page"
instead of "scenario 0", which is difficult to look up or
understand without the config file side-by-side.

Change-Id: If9884c38eef8b05637a8045c4beb3f2bbf8f5de5

5 years agoVarious fixes to make phan-taint-check happier
Brian Wolff [Sun, 17 Feb 2019 11:36:13 +0000 (11:36 +0000)]
Various fixes to make phan-taint-check happier

Bug: T216348
Change-Id: Ice672eed3b7e4a199e1307a6477ffe31502b97b5

5 years agoMerge "Add separate log action for file reverts"
jenkins-bot [Sat, 2 Mar 2019 23:48:48 +0000 (23:48 +0000)]
Merge "Add separate log action for file reverts"

5 years agovalidateRegistrationFile: Accept glob patterns
Kunal Mehta [Sat, 23 Feb 2019 04:44:10 +0000 (20:44 -0800)]
validateRegistrationFile: Accept glob patterns

I've had this locally for a while now - it makes it easier to validate all
extension.json files that you might have checked out. The only catch is that
you have to escape the glob pattern from your shell.

Change-Id: Ic220034574129fab9e850f91c05dbd5e241f556c

5 years agoAdd separate log action for file reverts
MGChecker [Mon, 1 Oct 2018 18:05:44 +0000 (20:05 +0200)]
Add separate log action for file reverts

This change s adds 'revert' as a separate log action for file reverts, as it
allows special formatting of log entries and revisions in UI and filtering
for file reverts specifically.

Even though there are no log entries with this log action right now, it does
seem that this was intended as some point, as there are corresponding
test cases in UploadLogFormatterTest, and is listed in
$wgLogActionsHandlers and https://www.mediawiki.org/wiki/API:Logevents
as well. Furthermore, the i18n message 'logentry-upload-revert' already
existed before this change.

Because this functionality can not be provided by tags, the 'mw-undo' tag
is not suited for this use case. However, it could be added additionally to
all log entries with this log action..

Bug: T60209
Change-Id: Ie1ccd8053dc5de58b2297a8460219f0233aab968

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 2 Mar 2019 20:56:43 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I333fd839423300bc3d1b9c62791a2d672a24d070

5 years agoMove FauxResponse class to own file
Umherirrender [Fri, 15 Feb 2019 19:11:49 +0000 (20:11 +0100)]
Move FauxResponse class to own file

Similar to FauxRequest

Change-Id: Ia9e4e7287ade605899d935db7c9f1f017e0bcb85

5 years agologging: Remove 'null' return from ManualLogEntry::getTags()
Timo Tijhof [Sat, 2 Mar 2019 17:01:18 +0000 (17:01 +0000)]
logging: Remove 'null' return from ManualLogEntry::getTags()

The documentation already claimed it returned array,
this is now actually true. Follows-up 037c06e886c63.

There are two ways it could be null:

* The setTags() method was never called, and the class member
  was implicitly null by default.

* The setTags() method was called with $tags = null.
  This happens WikiPage::doUpdateRestrictions() among other places.
  That could probably be fixed, but is out of scope for this change.

The getTags() method of this clss appears to have no outside
callers in MediaWiki core, nor in any other project indexed
by Codesearch.

Change-Id: Ib89c79ef90870506187c3c3b61464c2aa788c594

5 years agoMerge "Show password policy flags on Special:PasswordPolicies"
jenkins-bot [Sat, 2 Mar 2019 03:51:05 +0000 (03:51 +0000)]
Merge "Show password policy flags on Special:PasswordPolicies"

5 years agoShow password policy flags on Special:PasswordPolicies
Gergő Tisza [Sun, 20 Jan 2019 02:16:51 +0000 (18:16 -0800)]
Show password policy flags on Special:PasswordPolicies

Follow-up to I28c31fc4ea.

Also improves what policy values are considered disabled, documents
how to extend core checks/flags and adds a structure test for it.

Bug: T118774
Change-Id: I66bf396e8e8a8c310a47ba337abe9070e7e83ff6

5 years agoRecentchanges: Hide instead of disable namespace selector checkboxes
Fomafix [Thu, 14 Feb 2019 17:43:55 +0000 (18:43 +0100)]
Recentchanges: Hide instead of disable namespace selector checkboxes

* Set the initial state of the visibility of the checkboxes already in
  HTML. This avoids a flash of not-hidden checkboxes while loading.
* Also add class="mw-input-with-label" to prevent line breaks in the
  label.

Change-Id: I15781b95590faa9cf65c19fe6fc84fa94ec786dc

5 years agoMerge "Simplify strings in PHP code"
jenkins-bot [Fri, 1 Mar 2019 22:03:26 +0000 (22:03 +0000)]
Merge "Simplify strings in PHP code"

5 years agoMerge "maintenance: Replace custom .ext extraction with pathinfo()"
jenkins-bot [Fri, 1 Mar 2019 21:51:24 +0000 (21:51 +0000)]
Merge "maintenance: Replace custom .ext extraction with pathinfo()"

5 years agoMerge "Add mediawiki.interface.helpers.styles where it is needed"
jenkins-bot [Fri, 1 Mar 2019 21:17:55 +0000 (21:17 +0000)]
Merge "Add mediawiki.interface.helpers.styles where it is needed"

5 years agoSimplify strings in PHP code
Fomafix [Fri, 1 Mar 2019 21:15:22 +0000 (22:15 +0100)]
Simplify strings in PHP code

Change-Id: I481810ade68b0c5a5be21d22e2a107646d5813e6

5 years agoMerge "Add UserSendConfirmationMail hook"
jenkins-bot [Fri, 1 Mar 2019 20:25:21 +0000 (20:25 +0000)]
Merge "Add UserSendConfirmationMail hook"

5 years agoMerge "Hygiene: use null-coalescing operator when operating on tags"
jenkins-bot [Fri, 1 Mar 2019 19:31:55 +0000 (19:31 +0000)]
Merge "Hygiene: use null-coalescing operator when operating on tags"

5 years agoAdd mediawiki.interface.helpers.styles where it is needed
jdlrobson [Thu, 28 Feb 2019 21:12:26 +0000 (13:12 -0800)]
Add mediawiki.interface.helpers.styles where it is needed

Bug: T212613
Change-Id: I7d5920c3464838f68dc1169779e2f2662a3e336e

5 years agoHygiene: use null-coalescing operator when operating on tags
Piotr Miazga [Fri, 1 Mar 2019 18:13:28 +0000 (19:13 +0100)]
Hygiene: use null-coalescing operator when operating on tags

Change-Id: I7d5b4e05ee6c010b4f9438bc4871a3369b1871a6

5 years agoReplace lowercase {@inheritdoc} with @inheritDoc
Thiemo Kreuz [Tue, 26 Feb 2019 12:57:24 +0000 (13:57 +0100)]
Replace lowercase {@inheritdoc} with @inheritDoc

According to the coding standards we even enforce with a custom PHPCS sniff.
It currently does not pick these mistakes up because of the curly brackets.
I'm not sure if this is worth an update of the PHPCS sniff. I wanted to
suggest this fix anyway.

Change-Id: I9041ea7a00baf7f55e0ff0e56879a89fb74bb479

5 years agomaintenance: Add missing limit parameters to some explode()
Thiemo Kreuz [Thu, 28 Feb 2019 08:55:50 +0000 (09:55 +0100)]
maintenance: Add missing limit parameters to some explode()

This is, in theory, a loophole that can not only cause such code to
consume suprising amounts of memory and runtime. It can also create
suprising results. For example, an input like

 -param="might contain a = char"

might result in a cut-off value.

Not so much of a problem in a maintenance script. But still good
practice, I find.

Change-Id: I14fb278e6fdb61d0c486ca7e23229851ea479408

5 years agoRemove references to obsolete special page and messages
Thalia [Fri, 1 Mar 2019 14:21:01 +0000 (14:21 +0000)]
Remove references to obsolete special page and messages

Remove references to Special:BlockMe, and messages 'proxyblocker-disabled'
and 'proxyblocksuccess' from the documentation for proxy block messages.
Restore the updated documentation introduced in the patch that removed
these (Id4c7521443f049), which was reversed in I922e660fafc7a95.

Change-Id: I98fa1b48506b5592b5f59e23520c3f0872ff4b4a

5 years agoAPI: Handle Messages in errorArrayToStatus()
Brad Jorsch [Fri, 1 Mar 2019 14:49:05 +0000 (09:49 -0500)]
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

5 years agoMerge "rdbms: document Database::doQuery() return value"
jenkins-bot [Fri, 1 Mar 2019 03:00:21 +0000 (03:00 +0000)]
Merge "rdbms: document Database::doQuery() return value"

5 years agoMerge "Avoid use of deprecated ObjectCache::getMainWANInstance method"
jenkins-bot [Fri, 1 Mar 2019 02:58:34 +0000 (02:58 +0000)]
Merge "Avoid use of deprecated ObjectCache::getMainWANInstance method"

5 years agoMerge "obectcache: split out some WAN cache refresh logic into scheduleAsyncRefresh()"
jenkins-bot [Fri, 1 Mar 2019 02:50:11 +0000 (02:50 +0000)]
Merge "obectcache: split out some WAN cache refresh logic into scheduleAsyncRefresh()"

5 years agoAvoid use of deprecated ObjectCache::getMainWANInstance method
Aaron Schulz [Thu, 28 Feb 2019 20:42:20 +0000 (12:42 -0800)]
Avoid use of deprecated ObjectCache::getMainWANInstance method

Change-Id: I429e68c8642a00afa812f5ae900c1fb4f8308528

5 years agoMerge "Remove comments literally repeating the next line of code"
jenkins-bot [Fri, 1 Mar 2019 02:37:27 +0000 (02:37 +0000)]
Merge "Remove comments literally repeating the next line of code"

5 years agordbms: document Database::doQuery() return value
Aaron Schulz [Fri, 1 Mar 2019 02:21:49 +0000 (18:21 -0800)]
rdbms: document Database::doQuery() return value

Removed random @throws tag from a subclass while at it

Change-Id: I1cad1f66b62bb4a306feb5c773ed5556891f82a7

5 years agoMerge "Fix is_array check in ResourceLoaderImageModule"
jenkins-bot [Fri, 1 Mar 2019 01:25:03 +0000 (01:25 +0000)]
Merge "Fix is_array check in ResourceLoaderImageModule"

5 years agoRCFilters: Make SaveFiltersPopup header's label and icon wrap
Volker E [Fri, 1 Mar 2019 00:17:02 +0000 (16:17 -0800)]
RCFilters: Make SaveFiltersPopup header's label and icon wrap

Wrapping SaveFiltersPopup header's label and icon in languages like
Catalan and German.
Also re-positioning close button from absolute top and remove duplicated,
inherited properties.

Change-Id: I3fd35b237f82ab95b66e6e710cba36cf1887618f

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

Change-Id: Ibd3587a45d063cdd7f7276bd15319f1067819eab