Also reword action-deleterevision, action-deletelogentry,
action-deletedtext and action-suppressrevision to match its
corresponding right-* messages
Bug: T329720
Change-Id: I3f0d9a76c5fb0dddb7de055b3cf2c335cd63e6d1
Subclasses of Maintenance that can function without database access can
now override canExecuteWithoutLocalSettings to return true.
This is useful for scripts that need to be able to run before or without
installing MediaWiki.
When no config file is present, the storage backend will be disabled.
Any attempt to access the database will result in an error.
NOTE: This makes MediaWikiServices::disableBackendServices() more
comprehensive, to avoid premature failures during service
construction. This change makes it necessary to adjust how the
installer manages service overrides.
The CLI installer is covered by CI, I tested the web installer
manually.
Change-Id: Ie84010c80f32cbdfd34aff9dde1bfde1ed531793
When a title is parsed with a default namespace of NS_USER a possible
interwiki at the begin would make the title external and ignores the
default namespace, but it would call IPUtils::sanitizeIP with empty
string, returning null
Bug: T329690
Change-Id: Id2a32c87d09d92ead20ad58547c22a513084ffa2
Also moving TemplatesOnThisPageFormatter to the same namesapce as it's
only used by EditPage
Bug: T321882
Change-Id: Ibefc44eb64aedb430148b109090584c3e35794ab
Similar to the exception thrown by ResourceLoader::makeConfigSetScript,
but non-fatal so as to generally allow more things to continue working
without it being silent and without giving up visibility through
Logstash.
Bug: T329330
Change-Id: I89832142b55ec0f4d1168314a897624e13ac8a0f
This made some sense in tables like pagelinks or templatelinks where
there are several tables with similar schemas (it's better to use a
central class intead but understandable).
For externallinks, it's completely useless. There is no other table with
_index_60 field and as result, no code actual use this option either.
It makes grepping harder, it's prone to errors and complicates the code
more than it needs to be.
Bug: T326251
Change-Id: I72ad81d5c3e8f62ceee30d9a44d71f37655ef506
ConvertibleTimestamp::setFakeTime is documented to
only take callbacks returning an int. ApiQueryLanguageinfoTest
violated this expectation, resulting in test breakage
(see I06c625abe351b2f189f5dbf6f331d34bb56004b2).
To get some integers to chose from, bump MAX_EXECUTE_SECONDS
to three.
Bug: T329609
Change-Id: I82d49a5e3a52c14dbd7e5324eb4c75cf7c33f3d2
I will need to mark the LanguageConverterIntegrationTest as
`@group Database` and move testHasVariant() to LanguageConverterTest
in the follow-up. Split this part out for smoother review.
Change-Id: I4f65669d982cc477992708d9dd49d1dc22c905c8
The DatabaseBlockStoreFactory is a new service which allows fetching
of a wiki-specific DatabaseBlockStore by fetching the correct
LoadBalancer via a LBFactory and then injecting it into the
DatabaseBlockStore. It also creates a wiki-specific ReadOnlyMode
and BlockRestrictionStore, which are also being injected.
This is being done as a part of the project of supporting cross-wiki
blocking.
The future plan is that BlockUser and UnblockUser are being updated to
properly support creating, updating and deleting cross-wiki blocks.
BlockUser and UnblockUser are then going to use a newly injected
DatabaseBlockStoreFactory to fetch the correct DatabaseBlockStore to
then insert/update/remove the block into/from the correct database.
Bug: T291849
Change-Id: I1051beedfd67c4e2c546b9eec04b6d592d969af3
Inkscape has an attribute only-selected in it's namespace which
is not interpreted by browsers and should be safe upload.
Bug: T288186
Change-Id: I044f225aef813efc708eb96f588fc55733d165f3
Before 1.39 we used <mw:toc> and in 1.39 we switched to <mw:tocplace/>
(commit 24949480eb). This was changed
to a <meta> tag in 1.40 (commit
0b10563895 and
fa8646ca7b) and the old content has long
since expired from the ParserCache. Clean up the old ParserCache
transition code.
Change-Id: I3254d0acba31e107b50767797a2b0ad28aba59ee
In LoadBalancer:
* Make the "chronologyCallback" return the DBPrimaryPos and make
loadSessionPrimaryPos() set the "waitForPos" more directly by
calling setSessionPrimaryPosIfHigher(). Previously, it relied
on the callback calling waitFor() to set the position as a side
effect.
* Remove redundant debug log entry in loadSessionPrimaryPos().
* Use type hints for waitFor()/waitForAll(). All callers already check
this for before invocation.
* Mark getReplicaResumePos() as @internal.
In ChronologyProtector:
* Update applySessionReplicationPosition() to return the position.
* Rename applySessionReplicationPosition() to yieldSessionPrimaryPos()
and stageSessionReplicationPosition() to stageSessionPrimaryPos() for
for consistency LoadBalancer/DBPrimaryPos.
Bug: T314434
Change-Id: I32aa784b424e7534047c9240e32fa5e0a2ac90b0
Fix documentation related to ExtraInterlanguageLinkPrefixes
configuration: it should be a list, not a map, and described usage
better.
In ApiQuerySiteInfo, third-party clients (like Parsoid) need to know
whether a given language link core corresponds to a deprecated
language code or a "real" one; the API was also missing information
regarding which language code an "extra language link" prefix
corresponds to (given by InterlanguageLinkCodeMap in the
configuration).
Finally, add the corresponding bcp47 codes for these interlanguage
links, so third-party clients don't need to know details of mediawiki
internal and deprecated language codes.
Change-Id: I82465261bc66f0b0cd30d361c299f08066494762
Dumping logs can be useful for interpreting CI test failures, but
is rarely needed when running phpunit locally and it makes the
output unreadable. In theory it should be possible to disable them
with the --no-extensions flag but that doesn't seem to work.
Allow disabling log dumping by prefixing the phpunit command with
PHPUNIT_LOGS=0.
Change-Id: I071ff3228e922c9aaf705e32e9e1a2351bb1e973