mediawiki.git
6 weeks agoUpdate git submoduleswmf/1.39.0-wmf.14
na1307 [Tue, 7 Jun 2022 20:20:07 +0000 (8 05:20 +0900)]
Update git submodules

* Update extensions/DiscussionTools from branch 'wmf/1.39.0-wmf.14'
  to 02a5dd0ddbb495b25b42747c99a68cba47cf1d10
  - Show createpage preference only when feature is available

    Bug: T310053
    Change-Id: I13262ecbe2d2c45c0ffb8706da17bc806ab2a5b7
    (cherry picked from commit edb276e04771bcefeb4619f47332c65a5e4c09f9)

6 weeks agoUpdate git submodules
Bartosz Dziewoński [Tue, 7 Jun 2022 20:20:05 +0000 (7 21:20 +0100)]
Update git submodules

* Update extensions/DiscussionTools from branch 'wmf/1.39.0-wmf.14'
  to 1d7d4cdfc046f6758e2932ad7473552825094330
  - Add preference for offering new topic tool when creating new talk pages

    Depends-On: I46a8eaf331e86de0c8c94f0f60bdc4b5be6dd83a
    Bug: T297990
    Change-Id: Iaf6677affe5d0b7f6047bce55c0a575286c8e676
    (cherry picked from commit e0f231b8923fce5733de1b8c4facf68c0a6682a7)

6 weeks agoUpdate git submodules
Bartosz Dziewoński [Tue, 7 Jun 2022 20:20:02 +0000 (7 22:20 +0200)]
Update git submodules

* Update extensions/DiscussionTools from branch 'wmf/1.39.0-wmf.14'
  to 08e936a401727c89a126d3a6c06eeceba9b782e0
  - Disable (instead of hiding) preferences that would have no effect

    Keeping them visible avoid the page shifting unpleasantly,
    and makes it easier to find the option you're looking for.

    Change-Id: I1e37d5d11c5a19beb799346f4e9842e836224d3a
    (cherry picked from commit 02ced052dbe14c8b5d66e62f39b40183d98912bb)

6 weeks agoAdd CSS class 'mw-htmlform-checkradio-indent' for indenting form fields
Bartosz Dziewoński [Mon, 6 Jun 2022 16:58:11 +0000 (6 18:58 +0200)]
Add CSS class 'mw-htmlform-checkradio-indent' for indenting form fields

Moving the implementation from styles for Special:Block (where it was
used for partial block fields) to a generic CSS class.

Change-Id: I46a8eaf331e86de0c8c94f0f60bdc4b5be6dd83a
(cherry picked from commit 7b264d22b25d80548c14721d6e81e21f8dcf9e6d)

6 weeks agoSpecialDeletedContributions: Hide date headers
AntiCompositeNumber [Fri, 3 Jun 2022 18:13:25 +0000 (3 14:13 -0400)]
SpecialDeletedContributions: Hide date headers

Mobile and screen reader-only date headers were added to
SpecialDeletedContributions in 3f8c4427bdff0234d328295cc101f949c9aecea8.
However, the styles to actually hide them on desktop were not loaded on
Special:DeletedContributions.

Change-Id: I7fccad3a8b76012258a35fcc00e72221386c6a8e
(cherry picked from commit 356647eda3411e1d362693906cc634f7ee6f8f1c)

6 weeks agoUpdate git submodules
Timo Tijhof [Thu, 2 Jun 2022 00:34:08 +0000 (2 01:34 +0100)]
Update git submodules

* Update extensions/WikimediaMessages from branch 'wmf/1.39.0-wmf.14'
  to 35345d3927e77a00786171556a2dc735c5bb70d0
  - ext.wikimediamessages.contactpage: Combine two minor modules

    This effectively balances the startup manifest cost added in
    Ia0910a46f94f9e55 for T299936.

    Change-Id: I5a700cd36485e2667bea6950fbf697b0737a97df
    (cherry picked from commit b291f5886593b9ff88f48c1102387434740c344d)

7 weeks agoUpdate git submodules
Amir Sarabadani [Wed, 1 Jun 2022 17:53:11 +0000 (1 19:53 +0200)]
Update git submodules

* Update extensions/Wikibase from branch 'wmf/1.39.0-wmf.14'
  to 4ffffb37517b91bcc9eacd8a2cbd1452ceaa3f88
  - Don't call saveSettings in EchoNotificationsHandlers::doLocalUserCreated

    It is causing deadlocks because after hook being called and done, core
    itself calls saveSettings(). See:
    https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/a2e5997a4c8667f11b7f05a389afedaf7ddf73f1/includes/auth/AuthManager.php#1515

    Bug: T306636
    Change-Id: I0be3cedda282f47ab665e187fc98d5987db4745e

7 weeks agoUpdate git submodules
Amir Sarabadani [Wed, 1 Jun 2022 14:49:27 +0000 (1 16:49 +0200)]
Update git submodules

* Update extensions/Thanks from branch 'wmf/1.39.0-wmf.14'
  to e0891da266749d832f807a65290d63a26a5f9729
  - Don't call saveOptions in Hooks::onAccountCreated

    It is causing deadlocks because after hook being called and done, core
    itself calls saveSettings(). See:
    https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/a2e5997a4c8667f11b7f05a389afedaf7ddf73f1/includes/auth/AuthManager.php#1515

    Bug: T306636
    Change-Id: I5ded25f56a58bf89b894a8fdd6d8200fb378eb75
    (cherry picked from commit 725bd574d7aed5ef328636fa41ee54bb51bf6296)

7 weeks agoUpdate git submodules
Amir Sarabadani [Wed, 1 Jun 2022 11:08:48 +0000 (1 13:08 +0200)]
Update git submodules

* Update extensions/PageTriage from branch 'wmf/1.39.0-wmf.14'
  to 7c5a199cc374503e8bb6743980008419d88ab9a9
  - Don't call saveOptions in LocalUserCreated

    It is causing deadlocks because after hook being called and done, core
    itself calls saveSettings(). See:
    https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/a2e5997a4c8667f11b7f05a389afedaf7ddf73f1/includes/auth/AuthManager.php#1515

    Bug: T306636
    Change-Id: If812a2fe4fdbea22581046e12235515b5c02bdfa
    (cherry picked from commit 511bd132ac2e467898d896b34f6932c9a8cc7055)

7 weeks agoUpdate git submodules
Derk-Jan Hartman [Wed, 1 Jun 2022 09:35:02 +0000 (1 11:35 +0200)]
Update git submodules

* Update extensions/TimedMediaHandler from branch 'wmf/1.39.0-wmf.14'
  to a40f14a9aa34b752db9d7434c9bb0d0466eea08f
  - Remove EnableLocalTimedText from SpecialOrphanedTimedText

    This variable no longer exists.
    Follow up to: Iba13088393b3b8d22e801a53bd4565eae7b0f6b0

    Bug: T309677
    Change-Id: I344863753c522681f0f184c8c42377728e2d0316
    (cherry picked from commit 4c147802f2e42bae1bbad6637a6b567f30e1dd78)

7 weeks agoAllow sharding in site_stats update
Amir Sarabadani [Tue, 26 Apr 2022 21:09:38 +0000 (26 23:09 +0200)]
Allow sharding in site_stats update

This would be useful in cases that lots of edits happen at the same time
and this would reduce the time waiting to get the row lock.

Bug: T306589
Change-Id: I3b869e3b85dfd66575390ef4247f2f81f19c878e
(cherry picked from commit 5156ae0404cd8cc544febd883037db207e456d6b)

7 weeks agoRevert "Tombstone the old session on SessionBackend::resetId()"
Gergő Tisza [Tue, 31 May 2022 14:17:41 +0000 (31 14:17 +0000)]
Revert "Tombstone the old session on SessionBackend::resetId()"

This reverts commit ec3da4589bebeb46d7f1544dc46f24baec334966.
Caused frequent session loss in the Wikimedia cluster.

Bug: T299193
Bug: T309616
Change-Id: I3a410df88071d72078672cf1b670e81c11b28117
(cherry picked from commit d1a1fcedc9eace8a5f4a8454eff44a7ed898848a)

7 weeks agoBranch commit for wmf/1.39.0-wmf.14
trainbranchbot [Tue, 31 May 2022 02:07:35 +0000 (31 02:07 +0000)]
Branch commit for wmf/1.39.0-wmf.14

Change-Id: Ie61bdca005cd2e302b10d1f7ab727fd8aa345617

7 weeks agoMerge "Docs: remove references to DefaultSettings.php"
jenkins-bot [Tue, 31 May 2022 00:40:35 +0000 (31 00:40 +0000)]
Merge "Docs: remove references to DefaultSettings.php"

7 weeks agophpunit: Do not access MW services in dataProviders
Kosta Harlan [Mon, 30 May 2022 21:14:02 +0000 (30 23:14 +0200)]
phpunit: Do not access MW services in dataProviders

We cannot access MW services in a data provider, as MW will not have
bootstrapped by this point in plain PHPUnit. And we do not want to
bootstrap MW by the time a dataProvider is executing, because unit tests
should not need (nor be able to access) MW services.

Change-Id: I21a5993f91b8fbe3fa476a8244b8911cf81e1d5f

7 weeks agoDocs: remove references to DefaultSettings.php
daniel [Wed, 27 Apr 2022 14:31:59 +0000 (27 16:31 +0200)]
Docs: remove references to DefaultSettings.php

Bug: T300129
Change-Id: I1e83a0dde6235bed91d28d7d43691c6a5d979f2f

7 weeks agoViewAction: Enable unconditional 1h hour CDN cache for any page views
Amir Sarabadani [Wed, 25 May 2022 13:34:12 +0000 (25 15:34 +0200)]
ViewAction: Enable unconditional 1h hour CDN cache for any page views

Currently, MediaWiki avoids CDN caching if the URL is not among the list
of canonical URLs that we purge, which can cause all sorts of issues
including caching being extremely narrow.

ViewAction is cache invariant and better to be cached unconditionally.

This effectively undoes part of Ie38ae198b1735339371 (2012). Similar
to the existing setCdnMaxage() calls, this is not expected to risk
caching of private information given that a separate layer is
responsible for deciding whether caching is "safe" from an application
point of view. Callint setCdnMaxage() does not affect whether CDN
caching is allowed, its just that the default maxage is 0 for cases
where it is safe, and this change effectively raises it to 1h for
arbitrary URLs that effectively route to action=view, including e.g.
diff URLs and oldid URLs, but e.g. not any other action parameters.

Bug: T309063
Change-Id: I468caa8fd4baf650b419572b77b3df64ae72780d

7 weeks agoMerge "Rest: Collect stats on Cache & Stash usage"
jenkins-bot [Mon, 30 May 2022 15:21:10 +0000 (30 15:21 +0000)]
Merge "Rest: Collect stats on Cache & Stash usage"

7 weeks agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Mon, 30 May 2022 14:04:22 +0000 (30 14:04 +0000)]
Merge "Localisation updates from https://translatewiki.net."

7 weeks agoMerge "SessionManage: Do not save when creating empty session"
jenkins-bot [Mon, 30 May 2022 12:54:06 +0000 (30 12:54 +0000)]
Merge "SessionManage: Do not save when creating empty session"

7 weeks agoSessionManage: Do not save when creating empty session
Gergő Tisza [Sat, 28 May 2022 07:17:30 +0000 (28 02:17 -0500)]
SessionManage: Do not save when creating empty session

SessionBackend::save() results in the session provider unpersisting
when the session backend metadata is dirty (which is always true
for a new session). This breaks the tombstone mechanism introduced
in I3a76b67aa51159ebf0195db15cf7c34e00a64a2e: after the manager
refuses to load the tombstoned session, it will create an empty
session, and that will unpersist the session ID and log the user
out if the session ID was the only thing that kept them logged in.

Saving the session has two effects: the unpersisting (invalid
cookies are cleaned up) and saving the session data in in-process
cache (but not the real storage). The latter might cause an extra
session storage read per unauthenticated request, though in theory
it shouldn't as the SessionBackend itself gets cached so a new
session lookup only happens for a different WebRequest object.
Still, if it becomes a problem, we can just add some sort of
explicit cache warming step to empty session creation.

Skipping the unpersisting could mean that invalid (e.g. expired)
session cookies stick around and prevent the user from being
served from edge cache. But for non-tombstoned requests, as long
as there is a syntactically valid session ID and either no user
ID or a user ID pointing to a valid user, CookieSessionProvider
will return a non-null session info, and SessionManager will
reject it and unpersist; and CentralAuthSessionProvider behaves
similarly except for the case when there is no local session
cookie but there is a global session cookie on the second-level
domain. That seems a narrow enough edge case to ignore.

Bug: T299193
Change-Id: Ib34a84d1d3abbce4dcf7433b51abf6e694984c59

7 weeks agoMerge "resourceloader: Improve internal type hints in FileModule class"
jenkins-bot [Mon, 30 May 2022 11:23:40 +0000 (30 11:23 +0000)]
Merge "resourceloader: Improve internal type hints in FileModule class"

7 weeks agoRest: Collect stats on Cache & Stash usage
Derick Alangi [Thu, 26 May 2022 10:36:28 +0000 (26 11:36 +0100)]
Rest: Collect stats on Cache & Stash usage

As a means of understanding the usage of the stash FEAT for
/page/html & /revision/html endpoints used by VE extension,
this patch introduces the collection of stats using the
StatsDataFactory.

Bug: T309017
Change-Id: I4e17d50e79da263637bdd55ab62e993df441fe38

7 weeks agoMerge "Update Breton messages."
jenkins-bot [Mon, 30 May 2022 08:00:07 +0000 (30 08:00 +0000)]
Merge "Update Breton messages."

7 weeks agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 30 May 2022 07:07:50 +0000 (30 09:07 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2356e57e88b2f97a219883f1667e3e6648da3ffa

7 weeks agoMerge "mailmap: Update Zabe's entry"
jenkins-bot [Mon, 30 May 2022 04:15:09 +0000 (30 04:15 +0000)]
Merge "mailmap: Update Zabe's entry"

7 weeks agoMerge "objectcache: handle object tokens in MediumSpecificBagOStuff::doCas()"
jenkins-bot [Sun, 29 May 2022 23:54:19 +0000 (29 23:54 +0000)]
Merge "objectcache: handle object tokens in MediumSpecificBagOStuff::doCas()"

7 weeks agomailmap: Update Zabe's entry
Alexander Vorwerk [Sun, 29 May 2022 21:52:32 +0000 (29 23:52 +0200)]
mailmap: Update Zabe's entry

Change-Id: Ia0caa257c3597d781ccd1d2fff9b42ecaabe7e37

7 weeks agoresourceloader: Minor doc changes following PSR-4 namepace change
Timo Tijhof [Mon, 16 May 2022 22:13:26 +0000 (16 23:13 +0100)]
resourceloader: Minor doc changes following PSR-4 namepace change

Follows Id08a220e1d60 (after I92998ae6a82e).

Change-Id: I33d20201bfee4595baa39c01eaf8b7de6034a8ed

7 weeks agoresourceloader: Improve internal type hints in FileModule class
Timo Tijhof [Fri, 27 May 2022 23:15:55 +0000 (28 00:15 +0100)]
resourceloader: Improve internal type hints in FileModule class

Follows-up I56a0ee74595404e1, I38a0761ae4633 and I6c3d186de1877f73d4.

Remove most "Usage" examples as these are internal and
mostly-normalized class fields. This is not where end-users should
look for documentation. Besides, many of the examples were wrong or
outdated, and almost all were incomplete. It also had an inherent
dilimma between describing all possible valid input and describing
what we actually store in that instance variable after normalization
in the class constructor. The usage docs have long been moved
to the MW config file, so we can omit that.

In its stead, place more complete and accurate type hints for Phan
to understand the possible code paths, in particular to reflect
the use of FilePath objects.

Change-Id: I1cc002f350785d3f46f79be5defb7b3cadbebf34

7 weeks agotests: Fix types in documentation by adding use statements
Umherirrender [Sat, 28 May 2022 06:56:01 +0000 (28 08:56 +0200)]
tests: Fix types in documentation by adding use statements

Some types used in @param/@return are not correct,
because the class is not used with namespace

Change-Id: Ic2643687378a6addabc2c9cd402224e442257f86

7 weeks agoMerge "api: Remove deprecated class alias ApiQueryContributions"
jenkins-bot [Sun, 29 May 2022 07:10:16 +0000 (29 07:10 +0000)]
Merge "api: Remove deprecated class alias ApiQueryContributions"

7 weeks agoMerge "Remove deprecated MediaWiki\Storage namespace for revision related class"
jenkins-bot [Sun, 29 May 2022 07:09:17 +0000 (29 07:09 +0000)]
Merge "Remove deprecated MediaWiki\Storage namespace for revision related class"

7 weeks agoMerge "content: Remove UnknownContent/UnknownContentHandler class alias"
jenkins-bot [Sun, 29 May 2022 07:07:42 +0000 (29 07:07 +0000)]
Merge "content: Remove UnknownContent/UnknownContentHandler class alias"

7 weeks agocontent: Remove UnknownContent/UnknownContentHandler class alias
Umherirrender [Sat, 28 May 2022 14:03:39 +0000 (28 16:03 +0200)]
content: Remove UnknownContent/UnknownContentHandler class alias

Renamed in a67cad6 in 1.36
The fallback content is designed for internal use only

Change-Id: I6977a9cf1eab0e701fd6969b1a2b5d1dfcecfdfa

7 weeks agoRemove deprecated MediaWiki\Storage namespace for revision related class
Umherirrender [Sat, 28 May 2022 14:25:10 +0000 (28 16:25 +0200)]
Remove deprecated MediaWiki\Storage namespace for revision related class

All revision related classes are namespaced MediaWiki\Revision
instead of MediaWiki\Storage since 1.32. The old namespaced
class names are deprecated and only kept for backwards-compatibility.

Bug: T305784
Change-Id: I48cdc65301a8cd20d2bedd031dbdae33b8c2a34d

7 weeks agoapi: Remove deprecated class alias ApiQueryContributions
Umherirrender [Sat, 28 May 2022 13:58:05 +0000 (28 15:58 +0200)]
api: Remove deprecated class alias ApiQueryContributions

Deprecated since 1.32

Change-Id: Ia4d2d01272175972f29a724c06c249bfeb522cfe

7 weeks agoMerge "fuzzTest.php: Simplify try/catch code"
jenkins-bot [Sat, 28 May 2022 21:41:03 +0000 (28 21:41 +0000)]
Merge "fuzzTest.php: Simplify try/catch code"

7 weeks agolanguage: Remove deprecated FakeConverter class alias
Umherirrender [Sat, 28 May 2022 14:05:41 +0000 (28 16:05 +0200)]
language: Remove deprecated FakeConverter class alias

Deprecated since 1.35

Change-Id: If3f1eb881db9ebd89b39545285f0540e76ef62b6

7 weeks agofuzzTest.php: Simplify try/catch code
Umherirrender [Sat, 28 May 2022 07:05:18 +0000 (28 09:05 +0200)]
fuzzTest.php: Simplify try/catch code

Change-Id: I925dd6b6f18118c8c4c577795e373f73337851d6

7 weeks agoMerge "objectcache: Deprecate BagOStuff::addBusyCallback() and reduce to a stub"
jenkins-bot [Sat, 28 May 2022 01:48:17 +0000 (28 01:48 +0000)]
Merge "objectcache: Deprecate BagOStuff::addBusyCallback() and reduce to a stub"

7 weeks agoobjectcache: handle object tokens in MediumSpecificBagOStuff::doCas()
Aaron Schulz [Fri, 10 Dec 2021 18:53:21 +0000 (10 10:53 -0800)]
objectcache: handle object tokens in MediumSpecificBagOStuff::doCas()

Some subclasses, like APCUBagOStuff, use the whole cache value itself
as the CAS token. Previously, in such cases, an error would be thrown
when the key held a PHP object, and the comparison would fail if the
key held an array that contained an object.

Make RedisBagOStuff and HashBagOStuff return null CAS tokens if the
value is false, to match other subclasses.

Make WinCacheBagOStuff CAS tokens distinguish int and digit strings.

Change-Id: I797f036e53aae7a4fdcb8586fbd4ebdbd7e8bae3

7 weeks agoMerge "installer,rdbms: Remove hints to Oracle and Microsoft SQL Server"
jenkins-bot [Sat, 28 May 2022 00:06:42 +0000 (28 00:06 +0000)]
Merge "installer,rdbms: Remove hints to Oracle and Microsoft SQL Server"

7 weeks agoinstaller,rdbms: Remove hints to Oracle and Microsoft SQL Server
Umherirrender [Fri, 13 May 2022 18:34:21 +0000 (13 20:34 +0200)]
installer,rdbms: Remove hints to Oracle and Microsoft SQL Server

Fix i18n messages still refers to both rdbms

Bug: T230418
Change-Id: I830c192331786d0dcf58eaf09e34f49fa4c88a06

7 weeks agotests: Update namespace for MediaWiki\SpecialPage\SpecialPageFactory
Umherirrender [Fri, 27 May 2022 23:27:33 +0000 (28 01:27 +0200)]
tests: Update namespace for MediaWiki\SpecialPage\SpecialPageFactory

MediaWiki\Special\SpecialPageFactory is deprecated since 1.35

Change-Id: I558a59e781edef4a78b4e902961809ba07f4f695

7 weeks agoMerge "tests: Do not use class alias in @covers"
jenkins-bot [Fri, 27 May 2022 23:14:41 +0000 (27 23:14 +0000)]
Merge "tests: Do not use class alias in @covers"

7 weeks agoMerge "tests: Use namespaced IDatabase class"
jenkins-bot [Fri, 27 May 2022 23:13:16 +0000 (27 23:13 +0000)]
Merge "tests: Use namespaced IDatabase class"

7 weeks agotests: Do not use class alias in @covers
Umherirrender [Fri, 27 May 2022 22:27:16 +0000 (28 00:27 +0200)]
tests: Do not use class alias in @covers

Also fix case for the XMLTypeCheck test

Change-Id: I809510c8085a36e20fd0eefb5e77d2671b3148f2

7 weeks agoMerge "resourceloader: Allow using FilePath directly in 'packageFiles' array"
jenkins-bot [Fri, 27 May 2022 22:21:52 +0000 (27 22:21 +0000)]
Merge "resourceloader: Allow using FilePath directly in 'packageFiles' array"

7 weeks agotests: Use namespaced IDatabase class
Umherirrender [Fri, 27 May 2022 20:38:32 +0000 (27 22:38 +0200)]
tests: Use namespaced IDatabase class

Change-Id: I7171ff26faee00d9eaabc33c2f3d91049ea0b40d

7 weeks agoMerge "resourceloader: Tweak RL\FilePath handling in packageFiles"
jenkins-bot [Fri, 27 May 2022 22:03:18 +0000 (27 22:03 +0000)]
Merge "resourceloader: Tweak RL\FilePath handling in packageFiles"

7 weeks agoMerge "Add codex-search v0.1.0-alpha.6"
jenkins-bot [Fri, 27 May 2022 21:54:13 +0000 (27 21:54 +0000)]
Merge "Add codex-search v0.1.0-alpha.6"

7 weeks agoresourceloader: Allow using FilePath directly in 'packageFiles' array
Bartosz Dziewoński [Fri, 27 May 2022 18:13:28 +0000 (27 20:13 +0200)]
resourceloader: Allow using FilePath directly in 'packageFiles' array

This already works in 'scripts', 'styles' etc.

Change-Id: I56a0ee74595404e1c40483b84400056d6f87b07d

7 weeks agoresourceloader: Tweak RL\FilePath handling in packageFiles
Bartosz Dziewoński [Tue, 24 May 2022 00:42:21 +0000 (24 02:42 +0200)]
resourceloader: Tweak RL\FilePath handling in packageFiles

ResourceLoader's FilePath is designed to allow a FileModule
to include files that exist outside of the module's localBasePath,
to allow skins and extensions to extend core MediaWiki modules.
This is accomplished by having the FileModule use the FilePath's
localBasePath instead, in FileModule::getLocalPath.
(Similarly for remoteBasePath, but these are going out of fashion.)

However, the code processing 'packageFiles' did not handle this right:
it used FilePath's localBasePath when it appeared as a 'file',
but not when it was returned by a 'callback' or 'versionCallback',
using the FileModule's localBasePath instead in that case. Most
existing uses of FilePath in 'packageFiles' required the same base
path as the module, so it was convenient to avoid providing it twice.

To keep that convenience (already relied on by some extensions too)
while also allowing skins and extensions to add files from their own
directories to existing modules, the code processing 'packageFiles'
now uses FilePath's base paths in all cases, but they are optional,
and will fall back to the FileModule's paths when not provided.

Follow-up to 2890bca27db3636348b1a052e9e4d23a6bb1e272.

Change-Id: I38a0761ae4633a567b685b52c1d73b6ce280ffb7

7 weeks agoMerge "Follow-up I8d62aedb: Fix .rotation mixin"
jenkins-bot [Fri, 27 May 2022 16:46:34 +0000 (27 16:46 +0000)]
Merge "Follow-up I8d62aedb: Fix .rotation mixin"

7 weeks agoSync up with Parsoid parserTests
Arlo Breault [Fri, 27 May 2022 16:13:52 +0000 (27 12:13 -0400)]
Sync up with Parsoid parserTests

This now aligns with Parsoid commit 4eb378d8c7cbdc9d6a939d6068f1c13e94e2b0ac

Change-Id: I3647805b5c909c227a828093bef600afb1ca475b

7 weeks agoFollow-up I8d62aedb: Fix .rotation mixin
Ed Sanders [Fri, 27 May 2022 16:06:40 +0000 (27 17:06 +0100)]
Follow-up I8d62aedb: Fix .rotation mixin

Change-Id: I342384c822554840e0cd5638cf7129365d9ee696

7 weeks agoMerge "parserTests.php: Default to --parsoid if you pass a parsoid-specific option"
jenkins-bot [Fri, 27 May 2022 16:00:29 +0000 (27 16:00 +0000)]
Merge "parserTests.php: Default to --parsoid if you pass a parsoid-specific option"

7 weeks agoMerge "ParserTestRunner: Use standard PHP mechanism for array defaults in constructor"
jenkins-bot [Fri, 27 May 2022 15:59:02 +0000 (27 15:59 +0000)]
Merge "ParserTestRunner: Use standard PHP mechanism for array defaults in constructor"

7 weeks agoMerge "Emit mw:File typeof for media"
jenkins-bot [Fri, 27 May 2022 15:58:54 +0000 (27 15:58 +0000)]
Merge "Emit mw:File typeof for media"

7 weeks agoMerge "objectcache: Simplify SqlBagOStuff class configuration"
jenkins-bot [Fri, 27 May 2022 15:21:44 +0000 (27 15:21 +0000)]
Merge "objectcache: Simplify SqlBagOStuff class configuration"

7 weeks agoMerge "rdbms: Deprecate DBO_SSL"
jenkins-bot [Fri, 27 May 2022 15:16:57 +0000 (27 15:16 +0000)]
Merge "rdbms: Deprecate DBO_SSL"

7 weeks agoobjectcache: Deprecate BagOStuff::addBusyCallback() and reduce to a stub
Tim Starling [Thu, 26 May 2022 01:05:10 +0000 (26 11:05 +1000)]
objectcache: Deprecate BagOStuff::addBusyCallback() and reduce to a stub

It's not called by anything since it was removed from
ChronologyProtector, and it is not needed for production.

Pass the timeout directly to LoadBalancer::waitForAll() instead of
using a WaitConditionLoop, as it was before e99bb1b7dcc4c52a74b

Change-Id: I5a1903e6e9ac145c06f77c690a0f6a487b4aa43f

7 weeks agoobjectcache: Simplify SqlBagOStuff class configuration
Tim Starling [Tue, 24 May 2022 03:48:03 +0000 (24 13:48 +1000)]
objectcache: Simplify SqlBagOStuff class configuration

Substantive changes:

* Remove the parameters globalKeyLB and localKeyLB, not needed in
  production, probably not used anywhere.
* Add a "cluster" parameter, for production.
* Don't call markServerDown() in LoadBalancer mode.

Style changes:

* Document config parameters separately from constructor parameters, to
  clarify the role of the wiring normalisation.
* Inject a load balancer from ObjectCache to SqlBagOStuff, using a
  closure to defer construction.
* Clarify the split between LoadBalancer mode and server array mode by
  introducing a useLB property. Use it instead of special shard index
  values and array counts.
* multiPrimaryModeType wasn't needed anywhere and wasn't available in
  the constructor, so it just became a boolean multiPrimaryMode.
* Add a test covering most of the server array (!useLB) branches.

Bug: T212129
Change-Id: Ib097082efb40b514a29a42286dc362f2e3743ee4

7 weeks agordbms: Deprecate DBO_SSL
Tim Starling [Thu, 26 May 2022 04:25:59 +0000 (26 14:25 +1000)]
rdbms: Deprecate DBO_SSL

Using a bitfield breaks server array template merging in LBFactoryMulti.

The only nice thing about flags compared to boolean constructor
parameters is the existence of setFlag(), clearFlag() and
restoreFlags(). But that is not useful for parameters that are used
during connect.

Bug: T134809
Change-Id: I088ef4a0e4c11a2cfe17415b325b455164004c1e

7 weeks agoMerge "Add mw:File to media styles"
jenkins-bot [Fri, 27 May 2022 14:33:54 +0000 (27 14:33 +0000)]
Merge "Add mw:File to media styles"

7 weeks agoparserTests.php: Default to --parsoid if you pass a parsoid-specific option
C. Scott Ananian [Thu, 26 May 2022 14:39:00 +0000 (26 10:39 -0400)]
parserTests.php: Default to --parsoid if you pass a parsoid-specific option

Change-Id: Ie3e66be8bd0df719a9487a0303885042c3bf7cb7

7 weeks agoParserTestRunner: Use standard PHP mechanism for array defaults in constructor
C. Scott Ananian [Fri, 20 May 2022 21:36:02 +0000 (20 17:36 -0400)]
ParserTestRunner: Use standard PHP mechanism for array defaults in constructor

The ParserTestRunner code was old enough that it used a number of different
mechanisms to supply defaults for options passed via an array; uniformly use
the standard PHP "array add" mechanism instead.

Change-Id: I1791f7f8b1ae2cc6f4dd23351e9810a98b598be1

7 weeks agoMerge "Fix Tyap (kcg) namespace names"
jenkins-bot [Fri, 27 May 2022 09:27:55 +0000 (27 09:27 +0000)]
Merge "Fix Tyap (kcg) namespace names"

7 weeks agoMerge "Remove unused message 'whatlinkshere-filters'"
jenkins-bot [Fri, 27 May 2022 09:27:08 +0000 (27 09:27 +0000)]
Merge "Remove unused message 'whatlinkshere-filters'"

7 weeks agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 27 May 2022 07:53:25 +0000 (27 09:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0dd2a00b54b8d2f9d9f7803186e251c3162d3f3f

7 weeks agoRemove unused message 'whatlinkshere-filters'
Bartosz Dziewoński [Fri, 27 May 2022 02:05:39 +0000 (27 04:05 +0200)]
Remove unused message 'whatlinkshere-filters'

Follow-up to 7496cc59dd1c3d04e3ff83e8562ceca8168a2028.

Change-Id: I912117f7e7547cd6da76cb659118143a4fa78905

7 weeks agomediawiki.skinning: Use preferred value unit `ms` for `transition`
Volker E [Thu, 26 May 2022 19:54:00 +0000 (26 12:54 -0700)]
mediawiki.skinning: Use preferred value unit `ms` for `transition`

Use `ms` for value unit in order to make it a valid value cross-browser.
Follow-up to I34f88b0ccd8.

Bug: T308979
Change-Id: Idf9f0d617ebb9a52641147ae657bc67cd8981fa1

7 weeks agoMerge "Move code from Maintenance to MaintenanceRunner"
jenkins-bot [Thu, 26 May 2022 17:54:01 +0000 (26 17:54 +0000)]
Merge "Move code from Maintenance to MaintenanceRunner"

7 weeks agoMerge "Extract parameter handling from Maintenance base class."
jenkins-bot [Thu, 26 May 2022 17:53:53 +0000 (26 17:53 +0000)]
Merge "Extract parameter handling from Maintenance base class."

7 weeks agoEmit mw:File typeof for media
Arlo Breault [Thu, 19 May 2022 20:43:00 +0000 (19 16:43 -0400)]
Emit mw:File typeof for media

This matches Parsoid commit I676a88d80e2739ba69d4e7646de56fb87ae3e8e8

A few reasons for this change:

* It's less painful to do this now than after the legacy parser is made
  to match Parsoid's output and more stuff depends on it.

* It simplifies the queries that are necessary to collect the media on a
  page, which makes it both easier to work with and requires shipping
  less bytes.

* The nested img|audio|video tags retain the distinction, so there's
  no loss of information.

* mw:File is a closer match to the [[File:Hiho.jpg]] syntax that
  generates these elements.

* For broken media, it's unclear which type should be applied and
  mw:File obviates the question.

* For manualthumb, it's unclear which type to choose if, say, the file is
  a video but we've rendered an image.  For now, we've gone with what's
  actually rendered in the page, but again mw:File avoids the issue.
  And yes, for this special case a poster could be used, that's T121617

* There's precedent in MediaWiki, where Image: redirects to the File:
  namespace.  We should have followed that lead earlier instead of
  introducing mw:Audio and mw:Video.

Bug: T273505
Depends-On: I9f36ef8bc3023195dd31e52f04e8f0f0f792d311
Depends-On: I0b11463b802b898429a451378f15987700752e0e
Change-Id: I719a367622b3887cfea3032582a767c2c38d0f87

7 weeks agoMerge "Add {{=}} as a built-in magic word"
jenkins-bot [Thu, 26 May 2022 17:32:32 +0000 (26 17:32 +0000)]
Merge "Add {{=}} as a built-in magic word"

7 weeks agomaintenance: Make updateRestrictions return true when done
Amir Sarabadani [Thu, 26 May 2022 16:16:35 +0000 (26 18:16 +0200)]
maintenance: Make updateRestrictions return true when done

This would fix running update.php because the updater needs to know if
it's done successfully or not.

Change-Id: I9a7e271433ca0638d9d94bc1e1b6bee85f69e856
Follows-Up: I17e73d5ef165481a5dd4c210da933b99c65ff79c

7 weeks agoMerge "schema: Drop legacy page_restrictions in page table"
jenkins-bot [Thu, 26 May 2022 12:42:17 +0000 (26 12:42 +0000)]
Merge "schema: Drop legacy page_restrictions in page table"

7 weeks agoschema: Drop legacy page_restrictions in page table
Amir Sarabadani [Tue, 24 May 2022 08:51:57 +0000 (24 10:51 +0200)]
schema: Drop legacy page_restrictions in page table

Bug: T35334
Change-Id: I17e73d5ef165481a5dd4c210da933b99c65ff79c

7 weeks agoFix Tyap (kcg) namespace names
Amir E. Aharoni [Wed, 25 May 2022 11:15:28 +0000 (25 14:15 +0300)]
Fix Tyap (kcg) namespace names

The wrong spellings are mostly my fault,
a find-and-replace error. This also fixes
the names for "Category" and "Special page",
that were translated incorrectly.

The first wiki in this language was only created
recently, and the wrong names weren't used anywhere,
so there's no reason to preserve them for
backwards compatibility.

Change-Id: I015e4c2cc4bb001e40312f662b4af9c4f8800483

7 weeks agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 26 May 2022 06:38:17 +0000 (26 08:38 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I57b963248a1209a550ffa7cb7507104e21ccd130

7 weeks agoMerge "rdbms: Move handling index and table aliases to SQLPlatform"
jenkins-bot [Wed, 25 May 2022 22:29:34 +0000 (25 22:29 +0000)]
Merge "rdbms: Move handling index and table aliases to SQLPlatform"

8 weeks agoMerge "mediawiki.special.createaccount: Allow loading on mobile"
jenkins-bot [Wed, 25 May 2022 19:57:32 +0000 (25 19:57 +0000)]
Merge "mediawiki.special.createaccount: Allow loading on mobile"

8 weeks agordbms: merge sql_mode logic with other connection variables
Aaron Schulz [Tue, 24 May 2022 16:01:30 +0000 (24 09:01 -0700)]
rdbms: merge sql_mode logic with other connection variables

Change-Id: I62f570466452992f63cb4835c70c915f874bd8ef

8 weeks agoMerge "RefreshLinksJob: Add getLagAwareRootTimestamp() helper to avoid duplication"
jenkins-bot [Wed, 25 May 2022 18:32:37 +0000 (25 18:32 +0000)]
Merge "RefreshLinksJob: Add getLagAwareRootTimestamp() helper to avoid duplication"

8 weeks agoMerge "tests: Fix memcached test failure with multiple BagOStuff test classes"
jenkins-bot [Wed, 25 May 2022 18:30:40 +0000 (25 18:30 +0000)]
Merge "tests: Fix memcached test failure with multiple BagOStuff test classes"

8 weeks agoRefreshLinksJob: Add getLagAwareRootTimestamp() helper to avoid duplication
Aaron Schulz [Thu, 19 May 2022 06:15:24 +0000 (18 23:15 -0700)]
RefreshLinksJob: Add getLagAwareRootTimestamp() helper to avoid duplication

Change-Id: I9864db1bfd2c011d7ab99ffa9cc384bf8f5afba2

8 weeks agotests: Fix memcached test failure with multiple BagOStuff test classes
Aaron Schulz [Thu, 19 May 2022 03:00:52 +0000 (18 20:00 -0700)]
tests: Fix memcached test failure with multiple BagOStuff test classes

Avoid paratest race conditions with multiple memcached classes using
the local server.

Bug: T50217
Change-Id: If88b9431d7c6dd7191ce35b64a6c743f93ea2b43

8 weeks agoobjectcache: set error status codes in MemcachedPhpBagOStuff
Aaron Schulz [Tue, 28 Sep 2021 23:58:22 +0000 (28 16:58 -0700)]
objectcache: set error status codes in MemcachedPhpBagOStuff

Bug: T252951
Change-Id: I5649a293108ed864e86ecd70f0922136c2c324c3

8 weeks agomediawiki.special.createaccount: Allow loading on mobile
Kosta Harlan [Wed, 25 May 2022 07:32:29 +0000 (25 09:32 +0200)]
mediawiki.special.createaccount: Allow loading on mobile

The module code is used for validating username and password fields.

Bug: T309149
Bug: T127268
Change-Id: I0def53b2360aea6917559c57852caf576a704fc4

8 weeks agoMerge "specials: Use language from context source on Special:Login/Logout"
jenkins-bot [Wed, 25 May 2022 14:49:45 +0000 (25 14:49 +0000)]
Merge "specials: Use language from context source on Special:Login/Logout"

8 weeks agoMerge "Rest: Return different eTags for different output modes"
jenkins-bot [Wed, 25 May 2022 11:34:10 +0000 (25 11:34 +0000)]
Merge "Rest: Return different eTags for different output modes"

8 weeks agoRest: Return different eTags for different output modes
Derick Alangi [Tue, 24 May 2022 21:13:42 +0000 (24 22:13 +0100)]
Rest: Return different eTags for different output modes

This patch enables the response from PageHTMLHandler and
RevisionHTMLHandler to have different eTags for different
output modes and varying flavors.

Before, the only difference we got was when the stashing
option is set or not, but we need more flavors.

Bug: T308744
Change-Id: I2e9679e46a31955a2106a52af4eb612b32799c8c

8 weeks agoMerge "Add missing commas in recently-updated messages"
jenkins-bot [Wed, 25 May 2022 09:37:11 +0000 (25 09:37 +0000)]
Merge "Add missing commas in recently-updated messages"

8 weeks agoAdd missing commas in recently-updated messages
Amir E. Aharoni [Wed, 25 May 2022 07:22:38 +0000 (25 10:22 +0300)]
Add missing commas in recently-updated messages

Change-Id: I49c9fe1209ebb8251b4fd0c81c3c07125cf15470

8 weeks agoMerge "Normalize cidr ranges on Special:Log before searching block logs"
jenkins-bot [Wed, 25 May 2022 08:47:18 +0000 (25 08:47 +0000)]
Merge "Normalize cidr ranges on Special:Log before searching block logs"

8 weeks agoMove code from Maintenance to MaintenanceRunner
daniel [Fri, 15 Apr 2022 22:20:41 +0000 (16 00:20 +0200)]
Move code from Maintenance to MaintenanceRunner

All code related to the runtime environment should live in the runner.

Change-Id: I50dc30be805378b4febc57d5f5a0967afa377dfa

8 weeks agoExtract parameter handling from Maintenance base class.
daniel [Sat, 9 Apr 2022 20:31:25 +0000 (9 22:31 +0200)]
Extract parameter handling from Maintenance base class.

We will need parameter handling in the runner as well as in the actual
maintenance script. So pull it out, so we can re-use it.

Change-Id: Ib67667fead8350e0a539323fb05b160f4c2d882e

8 weeks agoMerge "RevisionStore: Cast revid to int from db result"
jenkins-bot [Wed, 25 May 2022 08:38:04 +0000 (25 08:38 +0000)]
Merge "RevisionStore: Cast revid to int from db result"