lhc/web/wiklou.git
4 years agoMerge "HTMLForm: Improve method documentation for setCollapsibleOptions()"
jenkins-bot [Thu, 23 May 2019 09:26:17 +0000 (09:26 +0000)]
Merge "HTMLForm: Improve method documentation for setCollapsibleOptions()"

4 years agoImageListPager: Use explicit escaped() instead of implicit __toString()
Fomafix [Thu, 23 May 2019 07:00:53 +0000 (09:00 +0200)]
ImageListPager: Use explicit escaped() instead of implicit __toString()

For the messages listfiles-latestversion-yes and
listfiles-latestversion-no a wikitext parsing is not necessary.

Change-Id: I6f9268ebabaa64494d8680b04990944e7a463f32

4 years agoHTMLForm: Improve method documentation for setCollapsibleOptions()
Timo Tijhof [Wed, 22 May 2019 22:38:45 +0000 (23:38 +0100)]
HTMLForm: Improve method documentation for setCollapsibleOptions()

Follows-up 36d33daa03a63.

Previously the method was described as "Set whether the form can be collapsed"
taking a single boolean.

Yet, the boolean did not influence whether the form can be collapsed, as one
might expect.

Rather, this method always enable collapsible mode. The thing that is set
based on the passed value is the default state of that (unconditionally)
enabled collapsible mode.

Change-Id: I2e73d5481c44ed43769553b2bc25543a702c19b8

4 years agoMerge "objectcache: make detectLocalServerCache() prefer apcu over apc"
jenkins-bot [Wed, 22 May 2019 22:37:14 +0000 (22:37 +0000)]
Merge "objectcache: make detectLocalServerCache() prefer apcu over apc"

4 years agoobjectcache: make detectLocalServerCache() prefer apcu over apc
Aaron Schulz [Wed, 22 May 2019 16:30:50 +0000 (09:30 -0700)]
objectcache: make detectLocalServerCache() prefer apcu over apc

Bug: T220470
Change-Id: I8b85859b3991d2360a74107299d44da2c60d0214

4 years agoMerge "resourceloader: Add tests for StartUpModule dep tree optimisation"
jenkins-bot [Wed, 22 May 2019 22:09:12 +0000 (22:09 +0000)]
Merge "resourceloader: Add tests for StartUpModule dep tree optimisation"

4 years agoMerge "registration: Add development requirements to extension.json"
jenkins-bot [Wed, 22 May 2019 21:41:48 +0000 (21:41 +0000)]
Merge "registration: Add development requirements to extension.json"

4 years agoMerge "resourceloader: Make MessageBlobStore global check key actually global"
jenkins-bot [Wed, 22 May 2019 21:27:38 +0000 (21:27 +0000)]
Merge "resourceloader: Make MessageBlobStore global check key actually global"

4 years agoresourceloader: Add tests for StartUpModule dep tree optimisation
Timo Tijhof [Wed, 22 May 2019 18:29:09 +0000 (19:29 +0100)]
resourceloader: Add tests for StartUpModule dep tree optimisation

Bug: T223402
Change-Id: I0450c052852068f3c78312f48a42645a8b77bc5c

4 years agoMerge "Fix some docs"
jenkins-bot [Wed, 22 May 2019 20:43:56 +0000 (20:43 +0000)]
Merge "Fix some docs"

4 years agoMerge "Work around disappearing Special:Preferences buttons on RTL in Edge"
jenkins-bot [Wed, 22 May 2019 20:35:31 +0000 (20:35 +0000)]
Merge "Work around disappearing Special:Preferences buttons on RTL in Edge"

4 years agoMerge "Reference T224165 when deprecating Parser::$mConf"
jenkins-bot [Wed, 22 May 2019 20:29:23 +0000 (20:29 +0000)]
Merge "Reference T224165 when deprecating Parser::$mConf"

4 years agoWork around disappearing Special:Preferences buttons on RTL in Edge
Bartosz Dziewoński [Wed, 22 May 2019 19:35:48 +0000 (21:35 +0200)]
Work around disappearing Special:Preferences buttons on RTL in Edge

Bug: T220706
Change-Id: If36dbade88f7594dea658f899f891e800c98529d

4 years agoMerge "npm: bump grunt-karma to 3.0.2"
jenkins-bot [Wed, 22 May 2019 20:01:19 +0000 (20:01 +0000)]
Merge "npm: bump grunt-karma to 3.0.2"

4 years agoMerge "Fix doc in maintenance/findHooks.php"
jenkins-bot [Wed, 22 May 2019 19:58:51 +0000 (19:58 +0000)]
Merge "Fix doc in maintenance/findHooks.php"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 22 May 2019 19:58:06 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic10472cce88fd44322506beb2330cc49f5d22fb0

4 years agoFix some docs
Matěj Suchánek [Wed, 22 May 2019 19:50:52 +0000 (21:50 +0200)]
Fix some docs

Discovered by phan.

Change-Id: Iadc2b151db6922f3159f061f10408d45636967c5

4 years agoExternalStore: Pass external domain to getReadOnlyReason
Jesús Martínez Novo [Mon, 22 Apr 2019 09:21:52 +0000 (11:21 +0200)]
ExternalStore: Pass external domain to getReadOnlyReason

Be consistent with other paths of code that supply the external domain
id to LoadBalancer instead of defaulting to the wiki's domain.

This was causing the getReadOnlyReason to fail because it tries to
connect to the local wiki database using external storage credentials.

Bug: T200471
Change-Id: Ie73ea931d5c93f967624ee67717f87c2d9a31559

4 years agoMerge "objectcache: check apc.serializer in APCBagOStuff like APCUBagOStuff"
jenkins-bot [Wed, 22 May 2019 18:46:21 +0000 (18:46 +0000)]
Merge "objectcache: check apc.serializer in APCBagOStuff like APCUBagOStuff"

4 years agoReference T224165 when deprecating Parser::$mConf
daniel [Wed, 22 May 2019 18:16:22 +0000 (20:16 +0200)]
Reference T224165 when deprecating Parser::$mConf

Bug: T224165
Change-Id: I98225ad03e4060dbc956905da01fdfe671526694

4 years agoresourceloader: Make MessageBlobStore global check key actually global
Timo Tijhof [Mon, 20 May 2019 23:02:47 +0000 (00:02 +0100)]
resourceloader: Make MessageBlobStore global check key actually global

Because it was still per-wiki, which isn't useful and makes
it really slow to invalidate by requiring a 900-wiki iteration
during deployments all of which fully initialise MW just to
send a single Memcached command basically.

Bug: T222539
Change-Id: I02a3e7d83172ccd7d8d0fba3be1e3f1ebb77efb2

4 years agoMerge "Configure LoadBalancer with $wgSharedTables after WAN cache autodetection"
jenkins-bot [Wed, 22 May 2019 17:38:46 +0000 (17:38 +0000)]
Merge "Configure LoadBalancer with $wgSharedTables after WAN cache autodetection"

4 years agoMerge "jquery.tablesorter: Fix pre-JS selector to match wikitext-generated sortable...
jenkins-bot [Wed, 22 May 2019 17:11:17 +0000 (17:11 +0000)]
Merge "jquery.tablesorter: Fix pre-JS selector to match wikitext-generated sortable tables"

4 years agoobjectcache: check apc.serializer in APCBagOStuff like APCUBagOStuff
Aaron Schulz [Wed, 22 May 2019 16:58:10 +0000 (09:58 -0700)]
objectcache: check apc.serializer in APCBagOStuff like APCUBagOStuff

This mirrors a1389b602411

Change-Id: Iad6b104337dfd38c74f363ce76c36aedcc3da425

4 years agoConfigure LoadBalancer with $wgSharedTables after WAN cache autodetection
Máté Szabó [Wed, 22 May 2019 16:03:50 +0000 (18:03 +0200)]
Configure LoadBalancer with $wgSharedTables after WAN cache autodetection

Currently, $wgSharedTables - if configured - is injected into the LoadBalancer
before the WAN cache autodetection runs. As such, if $wgSharedTables is set
but $wgMainWANCache was not explicitly given, the LoadBalancer will force
a premature instantion of the WAN cache with an EmptyBagOStuff backend,
preventing the autodetection logic from setting a correct backend.
This change moves $wgSharedTables initialization after the WAN cache
autodetection to accunt for this scenario.

Change-Id: I59bb52f42905cda1c2aa47bc589a2f0b36b2a28f

4 years agoMerge "Deprecate $wgWikiDiff2MovedParagraphDetectionCutoff"
jenkins-bot [Wed, 22 May 2019 14:50:35 +0000 (14:50 +0000)]
Merge "Deprecate $wgWikiDiff2MovedParagraphDetectionCutoff"

4 years agoMerge "Make some array type hints more specific"
jenkins-bot [Wed, 22 May 2019 14:18:31 +0000 (14:18 +0000)]
Merge "Make some array type hints more specific"

4 years agoDeprecate $wgWikiDiff2MovedParagraphDetectionCutoff
Adam Wight [Wed, 22 May 2019 13:42:20 +0000 (15:42 +0200)]
Deprecate $wgWikiDiff2MovedParagraphDetectionCutoff

Bug: T194272
Change-Id: I174192dc2b91409e023c06b054bc1bba8bfc571f

4 years agoMerge "Exclude FileImporter browser tests"
jenkins-bot [Wed, 22 May 2019 12:28:33 +0000 (12:28 +0000)]
Merge "Exclude FileImporter browser tests"

4 years agoMake some array type hints more specific
Thiemo Kreuz [Wed, 22 May 2019 11:37:12 +0000 (13:37 +0200)]
Make some array type hints more specific

Change-Id: Ia9ed6fa851316baa47e73d9a5988a863d15f298c

4 years agoMerge "EditPage: Migrate Title::userCan() calls to PermissionManager"
jenkins-bot [Wed, 22 May 2019 11:18:36 +0000 (11:18 +0000)]
Merge "EditPage: Migrate Title::userCan() calls to PermissionManager"

4 years agoMerge "externalstore: make ExternalStoreDB::getDomainId treat false the same as null"
jenkins-bot [Wed, 22 May 2019 10:38:34 +0000 (10:38 +0000)]
Merge "externalstore: make ExternalStoreDB::getDomainId treat false the same as null"

4 years agoMerge "Add additional configuation parameters to RESTBagOStuff"
jenkins-bot [Wed, 22 May 2019 10:13:55 +0000 (10:13 +0000)]
Merge "Add additional configuation parameters to RESTBagOStuff"

4 years agoMerge "Don't pass Config to Parser(Factory)"
jenkins-bot [Wed, 22 May 2019 10:13:48 +0000 (10:13 +0000)]
Merge "Don't pass Config to Parser(Factory)"

4 years agoMerge "registration: Fix validation of ext-foo values"
jenkins-bot [Wed, 22 May 2019 10:12:52 +0000 (10:12 +0000)]
Merge "registration: Fix validation of ext-foo values"

4 years agoMerge "Fix logic in NamespaceInfo::getRestrictionLevels"
jenkins-bot [Wed, 22 May 2019 09:48:08 +0000 (09:48 +0000)]
Merge "Fix logic in NamespaceInfo::getRestrictionLevels"

4 years agoMerge "WikiPage: Make prepareContentForEdit method not accept an integer"
jenkins-bot [Wed, 22 May 2019 09:23:57 +0000 (09:23 +0000)]
Merge "WikiPage: Make prepareContentForEdit method not accept an integer"

4 years agoregistration: Add development requirements to extension.json
Kunal Mehta [Sun, 19 May 2019 09:17:56 +0000 (02:17 -0700)]
registration: Add development requirements to extension.json

Extensions can specify development dependencies in extension.json under
the "dev-requires" key. It's identical to the "requires" field.

Any requirement that is needed to pass tests, including but not limited
to, PHPUnit, QUnit, structure, phan, should be documented in this new
field. The main intention is that CI will ensure that all of these
dependencies are satisfied before running tests.

At standard runtime, the development requirements will be ignored by
MediaWiki, since it only checks for real requirements. Scripts can
manually check development requirements by calling
ExtensionRegistry::setCheckDevRequires( true ) before trying to load
things.

If both "requires" and "dev-requires" are present, MediaWiki will merge
the two together, so the environment will need to satisfy both before
proceeding.

Bug: T193824
Change-Id: I9b2936666ee3c96f5c976c7a17f11c437c2c7f48

4 years agoregistration: Fix validation of ext-foo values
Kunal Mehta [Wed, 22 May 2019 08:57:05 +0000 (01:57 -0700)]
registration: Fix validation of ext-foo values

Our json-schema library doesn't yet support "const" (at least not in a
released version), so use "enum" with one element, since it's functionally
equivalent per <https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values>.

Change-Id: Ib9ebb5c6b9d07903fa47603fbe54a148e9c00352

4 years agoFix doc in maintenance/findHooks.php
Matěj Suchánek [Wed, 22 May 2019 08:34:34 +0000 (10:34 +0200)]
Fix doc in maintenance/findHooks.php

Change-Id: Iad3f2fc0910049dbfd5039f3589dd3f3918f1392

4 years agoWikiPage: Make prepareContentForEdit method not accept an integer
Matěj Suchánek [Tue, 21 May 2019 18:17:20 +0000 (20:17 +0200)]
WikiPage: Make prepareContentForEdit method not accept an integer

This has been deprecated since 1.25.

Bug: T220656
Change-Id: I94f5cb78adcfbec1fdafd89495c045e6f8fd9246

4 years agoMerge "rdbms: improve query logging logic in Database"
jenkins-bot [Tue, 21 May 2019 22:12:32 +0000 (22:12 +0000)]
Merge "rdbms: improve query logging logic in Database"

4 years agoMerge "watchlist: make getLatestNotificationTimestamp() method use the correct user"
jenkins-bot [Tue, 21 May 2019 22:01:03 +0000 (22:01 +0000)]
Merge "watchlist: make getLatestNotificationTimestamp() method use the correct user"

4 years agonpm: bump grunt-karma to 3.0.2
Michael Holloway [Tue, 21 May 2019 21:26:41 +0000 (17:26 -0400)]
npm: bump grunt-karma to 3.0.2

`npm install` currently fails due to an unsatisfied peer dependency.
See full output here:

https://phabricator.wikimedia.org/P8552

Bumping the required grunt-karma version to the latest (3.0.2) fixes
this.

Change-Id: I5b7f2deba2d766b809a964f53cb22f47f0617bd6

4 years agoexternalstore: make ExternalStoreDB::getDomainId treat false the same as null
Aaron Schulz [Sun, 21 Apr 2019 19:57:05 +0000 (12:57 -0700)]
externalstore: make ExternalStoreDB::getDomainId treat false the same as null

Callers like SqlBlobStore sometimes pass in false for the current wiki

Bug: T200471
Change-Id: I3025c869df07de312471d00a0ab7107c1fa14a90

4 years agoRemoved 'public $user' as it is deprecated in 1.29
zoranzoki21 [Tue, 21 May 2019 20:54:52 +0000 (22:54 +0200)]
Removed 'public $user' as it is deprecated in 1.29

Change-Id: If9c59d432e4b8b91b8c81200bf3a8a910461eded

4 years agoAdd additional configuation parameters to RESTBagOStuff
Bill Pirkle [Mon, 29 Apr 2019 21:30:02 +0000 (16:30 -0500)]
Add additional configuation parameters to RESTBagOStuff

Class RESTBagOStuff is needed for the Kask session storage
service. Add additional configuration parameters so that
they will work together.

Bug: T215533
Change-Id: Ifbb9f8847bd10d65cc5e24f4aa6cb20cb71de3ca

4 years agoMerge "Correct autonym for rmy (Vlax Romani)"
jenkins-bot [Tue, 21 May 2019 07:30:50 +0000 (07:30 +0000)]
Merge "Correct autonym for rmy (Vlax Romani)"

4 years agoCorrect autonym for rmy (Vlax Romani)
Siebrand Mazeland [Sat, 18 May 2019 15:50:42 +0000 (17:50 +0200)]
Correct autonym for rmy (Vlax Romani)

Bug: T223524
Change-Id: Id128199119001bd318012d034ef727cdfa256f54

4 years agowatchlist: make getLatestNotificationTimestamp() method use the correct user
Aaron Schulz [Tue, 21 May 2019 00:32:41 +0000 (17:32 -0700)]
watchlist: make getLatestNotificationTimestamp() method use the correct user

This uses the proper stash entry and also fits within the 3 item process
cache in WatchedItemStore that contains last-visit maps for users.

Follows-up 588a46468252, which added use of the stash optimisation but
wrongly keyed against rc_actor/rc_user instead of $this->getUser,
which means that unlike the DB 'wl_notificationtimestamp' field (which
is result of joining against watchlist and user via $this->getUser), it
was now reading the cache key for a different user instead of the user
that is viewing their watchlist.

Bug: T218511
Bug: T223310
Change-Id: I5c4dd2c7384f7681cee21fb2caf10d4d4b64c724

4 years agoMerge "Remove tryLastResult function from includes/specials/QueryPage.php"
jenkins-bot [Mon, 20 May 2019 22:58:51 +0000 (22:58 +0000)]
Merge "Remove tryLastResult function from includes/specials/QueryPage.php"

4 years agoMerge "rdbms: replace some return-based sanity checks in Database with exception...
jenkins-bot [Mon, 20 May 2019 22:52:30 +0000 (22:52 +0000)]
Merge "rdbms: replace some return-based sanity checks in Database with exception-based checks"

4 years agordbms: replace some return-based sanity checks in Database with exception-based checks
Aaron Schulz [Mon, 20 May 2019 19:47:18 +0000 (12:47 -0700)]
rdbms: replace some return-based sanity checks in Database with exception-based checks

Change-Id: I51a541fb560438a34522ca442a8b8e572830deea

4 years agoRemove tryLastResult function from includes/specials/QueryPage.php
zoranzoki21 [Thu, 16 May 2019 13:56:17 +0000 (15:56 +0200)]
Remove tryLastResult function from includes/specials/QueryPage.php

It is deprecated in 1.27

Change-Id: Ia10696a3d8e700cdf889c15e9b16b9d8e3e7f94f

4 years agoMerge "jobqueue: Remove duplicate property from DoubleRedirectJob"
jenkins-bot [Mon, 20 May 2019 20:05:38 +0000 (20:05 +0000)]
Merge "jobqueue: Remove duplicate property from DoubleRedirectJob"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 20 May 2019 19:55:39 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I30b63a979dbf32b92ba5bea8799afdd51d00ce5f

4 years agoDon't pass Config to Parser(Factory)
Aryeh Gregor [Fri, 12 Apr 2019 09:50:30 +0000 (12:50 +0300)]
Don't pass Config to Parser(Factory)

Change-Id: I5996b7cad8c8a61518d2997e955a4547c64a73a5

4 years agoExclude FileImporter browser tests
Adam Wight [Mon, 20 May 2019 12:03:16 +0000 (14:03 +0200)]
Exclude FileImporter browser tests

These test must be run from the extension's repo, because they use a custom
script to modify LocalSettings.php.

Bug: T190829
Change-Id: I920c7faa3ce91f1560f383575aa6a6adfcadd9c7

4 years agoMerge "Allow hidden skins to show up in preferences"
jenkins-bot [Mon, 20 May 2019 06:46:02 +0000 (06:46 +0000)]
Merge "Allow hidden skins to show up in preferences"

4 years agoMerge "Enable email settings for ApiBlockTest::testBlockWithEmailBlock"
jenkins-bot [Mon, 20 May 2019 05:14:48 +0000 (05:14 +0000)]
Merge "Enable email settings for ApiBlockTest::testBlockWithEmailBlock"

4 years agoMerge "Enable email in TemporaryPasswordPrimaryAuthenticationProviderTest"
jenkins-bot [Mon, 20 May 2019 05:06:12 +0000 (05:06 +0000)]
Merge "Enable email in TemporaryPasswordPrimaryAuthenticationProviderTest"

4 years agoMerge "Linker: Fix fatal error for "/* */" in an edit summary"
jenkins-bot [Sun, 19 May 2019 21:37:51 +0000 (21:37 +0000)]
Merge "Linker: Fix fatal error for "/*  */" in an edit summary"

4 years agoSpecialAllMessages: Specify filter messages so we always escape them
Daimona Eaytoy [Sun, 19 May 2019 13:51:25 +0000 (15:51 +0200)]
SpecialAllMessages: Specify filter messages so we always escape them

As reported by phan-taint-check, HTMLForm options have to be escaped.

Bug: T223821
Change-Id: I663911a2c3d8a5c60d407e84ec528f71af2eafe9

4 years agoAllow hidden skins to show up in preferences
jdlrobson [Sat, 18 May 2019 17:19:54 +0000 (19:19 +0200)]
Allow hidden skins to show up in preferences

It should be possible for power users to reveal hidden preferences
using the useskin query parameter. In future this will allow us
to use wgSkipSkins to deprecate poorly supported skins for new
users whilst not hard deprecating and removing skin support for
users who strongly want to continue to use them.

Change-Id: I1bbd4a09dff72f513c9413e0f826d8db38a5e04c

4 years agoMerge "Follow-up 3535a5f327: Remove old CSS now caches have expired"
jenkins-bot [Sun, 19 May 2019 13:12:04 +0000 (13:12 +0000)]
Merge "Follow-up 3535a5f327: Remove old CSS now caches have expired"

4 years agoLinker: Fix fatal error for "/* */" in an edit summary
Timo Tijhof [Sun, 19 May 2019 11:17:23 +0000 (13:17 +0200)]
Linker: Fix fatal error for "/*  */" in an edit summary

Follows-up b6e1e99bec8, which switched the method from Title::makeTitleSafe
to TitleValue. The latter throws fatal on non-string $fragment.

Title::makeTitleSafe, on the other hand, uses makeName(), which casts
$fragment to a string, and ignores if it ends up as empty string
(boolean false becomes empty string and thus did "the right thing").

Bug: T222857
Change-Id: Iecc2140fabd31ef0f193740c7fab0fc698c38e51

4 years agoMerge "i18n: Rename 11 messages for case-compliance"
jenkins-bot [Sun, 19 May 2019 10:00:00 +0000 (10:00 +0000)]
Merge "i18n: Rename 11 messages for case-compliance"

4 years agoMerge "Simplify a few list() that only care about the first element"
jenkins-bot [Sun, 19 May 2019 08:18:37 +0000 (08:18 +0000)]
Merge "Simplify a few list() that only care about the first element"

4 years agoMerge "docs: Fix UploadVerifyUpload/UploadStashFile hook docs"
jenkins-bot [Sun, 19 May 2019 08:17:11 +0000 (08:17 +0000)]
Merge "docs: Fix UploadVerifyUpload/UploadStashFile hook docs"

4 years agoMerge "Replace use of deprecated methods in Linker and SkinFactory classes"
jenkins-bot [Sun, 19 May 2019 08:03:45 +0000 (08:03 +0000)]
Merge "Replace use of deprecated methods in Linker and SkinFactory classes"

4 years agoMerge "Simplify a few binary checks for bit 1"
jenkins-bot [Sun, 19 May 2019 07:54:48 +0000 (07:54 +0000)]
Merge "Simplify a few binary checks for bit 1"

4 years agoMerge "Remove covers validator trait where it is not needed"
jenkins-bot [Sun, 19 May 2019 07:54:41 +0000 (07:54 +0000)]
Merge "Remove covers validator trait where it is not needed"

4 years agoMerge "Remove useless use of current and end"
jenkins-bot [Sun, 19 May 2019 06:46:42 +0000 (06:46 +0000)]
Merge "Remove useless use of current and end"

4 years agoMerge "Turn logout link into a POST API call with refresh"
jenkins-bot [Sat, 18 May 2019 20:03:13 +0000 (20:03 +0000)]
Merge "Turn logout link into a POST API call with refresh"

4 years agoTurn logout link into a POST API call with refresh
Amir Sarabadani [Thu, 25 Apr 2019 11:23:09 +0000 (13:23 +0200)]
Turn logout link into a POST API call with refresh

It's better to get rid of any GET request with csrf token

Bug: T25227
Change-Id: I76464c750945d07a283b99b449f137593c685f02

4 years agoRemove useless use of current and end
Florian [Sat, 18 May 2019 18:50:47 +0000 (20:50 +0200)]
Remove useless use of current and end

The ConfigRepository is not an Interable (any more), so these functions
don't have any useable effect.

Bug: T221045
Change-Id: I6e5bfd9d922d2838c65d52815590dcad1fe6d284

4 years agoEditPage: Migrate Title::userCan() calls to PermissionManager
Máté Szabó [Sat, 18 May 2019 16:31:55 +0000 (18:31 +0200)]
EditPage: Migrate Title::userCan() calls to PermissionManager

T208768 introduced the PermissionManager service that can now be used
for page specific permission checks. This change replaces calls to
Title::userCan() with the new service in the EditPage class.

Bug: T220191
Change-Id: I835d68d6c47785cf35386bca0431907fee87f0c1

4 years agoTypehint against IDatabase in special pages
Umherirrender [Sat, 18 May 2019 16:24:08 +0000 (18:24 +0200)]
Typehint against IDatabase in special pages

Change-Id: I1ec906cc7b284a3de02bb67fb41b5cf9e67ff3d2

4 years agoi18n: Rename 11 messages for case-compliance
James D. Forrester [Tue, 30 Apr 2019 20:41:50 +0000 (13:41 -0700)]
i18n: Rename 11 messages for case-compliance

Can't yet enforce due to the API.

* allmessagesnotsupportedDB
* rcfilters-filtergroup-userExpLevel
* rcfilters-filtergroup-lastRevision
* number_of_watching_users_RCview
* apihelp-query+allfileusages-example-B
* apihelp-query+allimages-example-B
* apihelp-query+alllinks-example-B
* apihelp-query+allpages-example-B
* apihelp-query+allredirects-example-B
* apihelp-query+alltransclusions-example-B
* apihelp-query+allusers-example-Y
* apiwarn-wgDebugAPI

Change-Id: I95961dfeb43e9cfadc867a48866af6335022572a

4 years agoMerge "i18n: Drop img-auth-nologinnWL, unused AFAICT"
jenkins-bot [Sat, 18 May 2019 14:37:06 +0000 (14:37 +0000)]
Merge "i18n: Drop img-auth-nologinnWL, unused AFAICT"

4 years agoMerge "i18n: Drop number_of_watching_users_pageview, unused since wgPageShowWatchingU...
jenkins-bot [Sat, 18 May 2019 14:36:59 +0000 (14:36 +0000)]
Merge "i18n: Drop number_of_watching_users_pageview, unused since wgPageShowWatchingUsers was dropped"

4 years agoUpdate wikimedia/at-ease from 1.2.0 to 2.0.0
Reedy [Tue, 12 Feb 2019 01:25:12 +0000 (01:25 +0000)]
Update wikimedia/at-ease from 1.2.0 to 2.0.0

https://github.com/wikimedia/at-ease/releases/tag/v2.0.0
https://github.com/wikimedia/at-ease/compare/v1.2.0...v2.0.0

Change-Id: Ia49a156e76d0a4e257e91cc6a51050848bcb9a5e
Depends-On: If40364e2590e3c23035838f8ed26c4f69e730602

4 years agoDrop wf(Suppress|Restore)Warnings, deprecated in 1.26
James D. Forrester [Tue, 19 Feb 2019 12:15:36 +0000 (12:15 +0000)]
Drop wf(Suppress|Restore)Warnings, deprecated in 1.26

Change-Id: Idcc9debd90e6ee12adf5ab7c4ec640db12828997

4 years agoHTMLForm: Add known MediaWiki version to wfDeprecated() call
Derick Alangi [Tue, 14 May 2019 13:29:40 +0000 (14:29 +0100)]
HTMLForm: Add known MediaWiki version to wfDeprecated() call

In 3706dcb, this method was soft deprecated and hard deprecated at
the same time (1.28) but during the call to wfDeprecated for hard
deprecation, the version number was missed, though this will default
to false, it's good to use the version number which is known in this
case (1.28).

Change-Id: I535ad07e79d14bac8ec42beaeb4b3762a494b28b

4 years agoMerge "jqueryMsg: Allow sneaking in non-qqx JavaScript messages in qqx mode"
jenkins-bot [Sat, 18 May 2019 09:01:37 +0000 (09:01 +0000)]
Merge "jqueryMsg: Allow sneaking in non-qqx JavaScript messages in qqx mode"

4 years agoMerge "IP: Remove unused deprecated ::isValidBlock() method"
jenkins-bot [Sat, 18 May 2019 08:02:09 +0000 (08:02 +0000)]
Merge "IP: Remove unused deprecated ::isValidBlock() method"

4 years agoMerge "Define date formats for Northern Sami"
jenkins-bot [Sat, 18 May 2019 07:44:59 +0000 (07:44 +0000)]
Merge "Define date formats for Northern Sami"

4 years agodocs: Fix UploadVerifyUpload/UploadStashFile hook docs
Thiemo Kreuz [Sat, 18 May 2019 06:30:16 +0000 (08:30 +0200)]
docs: Fix UploadVerifyUpload/UploadStashFile hook docs

1. FSFile::getPropsFromPath() is not used by any code any more.
https://codesearch.wmflabs.org/search/?q=FSFile%3A%3AgetPropsFromPath&i=1
The only remaining usage is in one test. We might as well remove the
function.

2. The $props array is passed to the hook for convenience, in case all
the file properties are already available. Fetching them from a file on
disc can be an expensive operation, and should be avoided if the
information is already available. But the caller does not guarantee this
is set. Other callees already know this can be a falsy value, notably
LocalFile::upload().

Change-Id: I43724d18467b6fb68a963b2206332cf553c81b2c

4 years agoDefine date formats for Northern Sami
Lucas Werkmeister [Fri, 17 May 2019 12:09:31 +0000 (14:09 +0200)]
Define date formats for Northern Sami

Following instructions from User:Yupik (at Wikimedia Hackathon 2019),
consulting [1], pages 10, 42, 43.

[1]: http://sh.pedit.no/web/NettskoleRessurs.axd?id=feb75bf8-6f42-402b-b622-29ce644c88d4

Bug: T223588
Change-Id: Ia63ea6ef09e95534ea0213bf28b26dbff3f3a7c4

4 years agoMerge "SearchResultSet: MW version number should be a string in wfDeprecated call"
jenkins-bot [Fri, 17 May 2019 21:13:44 +0000 (21:13 +0000)]
Merge "SearchResultSet: MW version number should be a string in wfDeprecated call"

4 years agoIP: Remove unused deprecated ::isValidBlock() method
Derick Alangi [Wed, 15 May 2019 14:15:03 +0000 (15:15 +0100)]
IP: Remove unused deprecated ::isValidBlock() method

This method was deprecated in 1.30 and no longer used in our code
bases.

Usage
=====

https://codesearch.wmflabs.org/search/?q=%5CbisValidBlock%5Cb&i=nope&files=&repos=

Change-Id: I26e11c0d88fe7c82c052c1cf8e0bbc33bd99de70

4 years agoMerge "Revert "Always validate uploads over api""
jenkins-bot [Fri, 17 May 2019 15:13:19 +0000 (15:13 +0000)]
Merge "Revert "Always validate uploads over api""

4 years agoMerge "Remove LegacyHookPreAuthenticationProvider class"
jenkins-bot [Fri, 17 May 2019 15:13:09 +0000 (15:13 +0000)]
Merge "Remove LegacyHookPreAuthenticationProvider class"

4 years agojobqueue: Remove duplicate property from DoubleRedirectJob
Thiemo Kreuz [Fri, 17 May 2019 15:08:36 +0000 (17:08 +0200)]
jobqueue: Remove duplicate property from DoubleRedirectJob

All the stuff that is passed as $params to the constructor is stored
in $this->params anyway.

Change-Id: Idec1c243de7cdbb1e55dd754555536ce0ec2024d

4 years agoSimplify a few binary checks for bit 1
Thiemo Kreuz [Fri, 17 May 2019 14:57:23 +0000 (16:57 +0200)]
Simplify a few binary checks for bit 1

( $var & 1 ) is either 0 or 1, which can be used as a boolean value.
The main advantage of this is that there is no confusion with the
operator precedence. In `$var & 1 !== 1` the `!==` is executed first,
effectively turning it into `$var & 0`. This always succeeds.

Change-Id: I53c81a3891d42b2660eefc311f1f0f2523104894

4 years agoSimplify a few list() that only care about the first element
Thiemo Kreuz [Fri, 17 May 2019 14:54:47 +0000 (16:54 +0200)]
Simplify a few list() that only care about the first element

The nice thing about explode() is that the resulting array is
guaranteed to contain at least one element. The array can not be
empty.

In some of these cases it might be possible to use strstr() instead,
but that returns an empty string when the needle character is not
found. explode() returns the original string in this case.

Change-Id: I6ad1f3273defeaf36e2305fd871eaaf9d3c1e134

4 years agoMerge "build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 and make...
jenkins-bot [Fri, 17 May 2019 14:52:23 +0000 (14:52 +0000)]
Merge "build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 and make pass"

4 years agoRemove covers validator trait where it is not needed
Thiemo Kreuz [Fri, 17 May 2019 14:48:35 +0000 (16:48 +0200)]
Remove covers validator trait where it is not needed

MediaWikiTestCase already contains this trait.

Change-Id: I08224ac12a58b41121697ab71d5c54ddbdd060ec

4 years agoRevert "Always validate uploads over api"
Hashar [Fri, 17 May 2019 14:42:21 +0000 (14:42 +0000)]
Revert "Always validate uploads over api"

The verification is broken with chunken uploads and ultimately
cause large files to no more be uploadable.

This reverts commit 38ec6d8a344d4eda0307dd3a72653dd2171305d6.

Bug: T223448
Change-Id: If414a8f751a3e1488a2ab099abd8b598c973c1f4

4 years agoRemove LegacyHookPreAuthenticationProvider class
Gergő Tisza [Wed, 10 Oct 2018 01:45:58 +0000 (18:45 -0700)]
Remove LegacyHookPreAuthenticationProvider class

Deprecated from birth, hard-deprecated since 1.33.

Change-Id: I03e94c02370ff0057e18274e9b409e162a0d7af0