Maintenance::finalSetup should have access to a SettingsBuilder so it
can manipulates config settings without resorting to global variables.
MaintenanceRunner will always provide a SettingsBuilder when calling
this method, so implementations should be able to rely on always getting
one.
The $settings parameter was introduced as optional in order to maintain
backwards compatibility with implementations that did not declare the
parameter. But these should all have been fixed since.
Depends-On: I8a3699b13bfb4dc15f3bed562731ed9d525651cc
Change-Id: I334a103e02fd905faafc43c7c5b95996bc91fd18
The User::newFromName is deprecated as of MediaWiki 1.36 and has been
replaced with the UserFactory::newFromName.
Change-Id: I5c03befc0e9f1a5d8d766374b44d6188f7ff0379
The wfParseUrl function is deprecated as of MediaWiki 1.39 and has been
replaced with the UrlUtils::parse method provided by the UrlUtils class.
List of affected classes:
- deleteSelfExternals
- UserMailer
Change-Id: I5e36ee80e5c30e95b79bf45e7b26860cb2668d56
This reverts commit b08b6a7785.
Reason for revert: T354384 and T354475, we may need a safer fix for the original bug (T352592).
Bug: T352592
Bug: T354475
Change-Id: I8c1cfb2a85297a7db75f45fbd247ec654ad33b49
Failure related to page permissions (like $wgNamespaceProtection or
.js/.css-pages) should not stop further linkpurges.
Also stop further recursive linkpurges when ratelimited,
as that only repeats the api warning message.
Bug: T354461
Change-Id: I153f7d8e472dd17cc26e329bee40005e1ed914fd
Follows-up Ib70e4e67e4cb1.
* This removed index.php from the "entrypoint"
group, but did not add MediaWikiEntryPoint in its stead.
* Fix broken `@see` reference, leading slash is not part of the
identifier for the `@file` block index.php, only works without it.
* Move the defgroup to a more natural place in the parent class' file.
Bug: T354216
Change-Id: I1281e0934368884f4d1ffbbd3f5588b9a211356f
Why:
* Part of a temporary user name is generated from an index that
increments, which is stored in the database.
* As specified in T345855, the index will be restarted each year.
* Also specified in T345855, the year will be included in
generated temporary user names.
What:
* Since the year must be included in the name in order to avoid
naming conflicts if the index is restarted each year, both are
implemented together and controlled by a single config.
* Add a new config option that, when true, restarts the name
generation index at the start of each year and add the year into
the user name: $wgAutoCreateTempUser['serialProvider']['useYear']
* Add a uas_year column to the user_autocreate_serial table, which
is unique in combination with uas_shard, so the index can be
stored for each shard/year combination.
* The year is added into the username just after the prefix, as
specified in T345855. This is based on research that having the
year near the start of the name aids understanding that the
names are not IP addresses. The position of the year within the
name is therefore not configurable (though whether to include
it is). See T345855 for the research.
Bug: T349494
Bug: T349501
Depends-On: I6b3c640a4e74f52fd4a4f46de5a2cbe80fe3b665
Change-Id: If51acb3f4efa361ce36d919c862a52501a5a7d24
This is mostly done for performance reasons, but can even be
user-facing in rare situations. Unfortunately it's really hard
if not impossible to provide steps to reproduce it. I hope the
proposed line of code makes sense on it's own.
The setup that made me run into this edge-case is explained in
https://www.mediawiki.org/wiki/Topic:Wugee2vl8m8kqr2h
But the idea is always the same, with or without the TwoColConflict
interface: When $wgDiff3 is misconfigured wfMerge() will return
false, as if a conflict was detected. But we can easily check if
it's even possible to have a conflict (impossible when the texts are
identical) even without having access to diff3.
The relevant caller is EditPage::mergeChangesIntoContent(). We could
add the new conditional to this spot as well. But I feel like it
makes more sense to always do it, for all possible callers. The
extra identity check is extremely inexpensive, even with long texts.
Change-Id: I5b1438b1ff71590718120367eb414b8e9754236e
MediaWiki's MWException class is deprecated since version 1.40.
Accordingly, this patch replaces the MWException base class with
PHP's built-in Exception class in UploadChunkFileException to
conform to current standards.
Change-Id: Iaf18520576a237d909e02c3238eb75070bcd5a6e
This patch simplifies the usage of the StreamInterface by
adding a use statement for the Psr\Http\Message\StreamInterface.
Change-Id: Id3fe73a81eb4a40c341fa426367cf71a9e82a481