This moves and refactors the ConsistentReadConnectionManager
from Wikibase into the core rdbms lib.
The refactoring also creates a generic ConnectionManager.
This relates to Iff20a22f9f2bc7ceefd6defc0ed9a494a6fe62c0
which introduced a DB factory / connection manager in
an extension revealing the need for this in multiple places.
Change-Id: I0c58e15aed5bed88323d18cb95e5008f8d3381c5
* do not warn if something is overwritten with an identical value
(happens a lot with 'ip')
* move to LogstashFormatter so we can check for the value
* instead of spamming errors, just add a flag to the logstash data
Bug: T145133
Change-Id: I31caee865cd60c785126478ac75c9aefce78eaaf
The class keyword should work in all reasonable working php installations,
as far as I know. In this way, the php version check does not rely on a
set of global functions. It also should make maintaining the different
checks a bit easier.
Change-Id: I73ee098a8cf931ca4df6263c6e0a3e215555b612
In order for an extension to add data to ApiQueryWatchlist, we need to
provide a way to allow it to manipulate the database query made by
WatchedItemQueryService. We also need some hooks in ApiQueryWatchlist to
handle the marshalling of data to and from WatchedItemQueryService.
To better handle hooking, this also moves some of the continuation logic
from ApiQueryWatchlist to WatchedItemQueryService.
Bug: T147939
Change-Id: Ie45376980f92da964a579887b28175c00fd8f57e
The conversion of SpecialNewpages to HTMLForm seems to be half-finished.
It's not using HTMLForm to read in the request query, which means we have
to roll our own logic. Kind of defeats the purpose of using HTMLForm in
the first place.
When ProtectedPages is converted to HTMLForm (T117722), it can use this new
field type.
Bug: T12817
Change-Id: I069609fbb37b18c3df25156779ad7ac7cd5d6813
Dependency-inject the MediaWiki-specific parts into a CryptHKDF
instance, which MWCryptHKDF wraps around.
Change-Id: Idff18635cfd8a3d93ea2ca8d56cdbd11eb4d3b2b
Literally every function in this class depends upon MediaWiki, so it
does not make sense to be included in the utils/ directory.
Change-Id: If6c6b75dc11b49b75f649d56eaeb9c96ef54b787
* The later resides in /libs with related files.
* Explose MimeAnalyzer as a service.
* Keep MimeMagic::singleton() as a b/c alias.
* MimeMagic::applyDefaultConfig() will bootstrap the service
with all of the old config, extension hook handler, and
detector command shell-out behavior.
Change-Id: Ie2695a52e7a3bcfda9f7fa83659a9ff31b372bc3
As an alternative to using magic links, PMID was added to the default
interwiki list.
RFC already existed, but the URL in the default list was pointing to
rfc-editor.org, not the tools.ietf.org view like the RFC magic link or
Wikimedia interwiki map are.
Updating the default lists in maintenance/interwiki* only affects new
installations, so a post-database update maintenance script adds and
updates the two interwiki prefixes.
Bug: T147536
Change-Id: I5a2c2c9b0f989da62a4395c9516d880c7d923444
Dependency-inject the MW-specific parts of MWCryptRand via
MediaWikiServices into a generic CryptRand class that is in libs/.
Note that this removes the wfGetAllCallers() debug logging from
generate().
Change-Id: I9742735c266ee69fb247199d3c553cd2ad2a3987
Remove the single wfDebug() call that was making this class MW specific,
someone can log the return value of MWCryptHash::hashAlgo() if they'd
like to know the specific implementation being used.
Change-Id: Ibb7ead7594edab7861631046dd8316daab613401
Since the WaitConditionLoop class was first introduced in 1.28 (current
master), no back-compat alias is added.
Bug: T146256
Depends-On: Ia84774d83da79fea1e167fe065c69549981f753b
Change-Id: Ibd4f15c87105b8caccbd1f661b74b6efa012b77f
It's no longer an LBFactory subclass (since 5d4b009cf), and the MW-prefix
seems more natural for this class.
The class has only existed since for about 2 weeks (since 0e5cd18b7) and
is not used outside MediaWiki core across Wikimedia Git.
Change-Id: I34be982b5d10ad03e062033da9c40b4a01665289
* Remove wf* function and ObjectCache dependencies.
* Use the base class session field.
* Lower physical lock structure TTL and move it to the base
class as a constant.
* Resolve TODO about acquiring mixed lock types in one pass.
* Only mark servers down for 30 seconds in case of long-running
scripts.
Change-Id: Icd4be407e599524cc620975d27e85666d2532b95
The ScopedCallback class was moved into a separate library. This updates
all callers to use the namespaced version, and provides a
backwards-compatibility class wrapper under the old name.
Bug: T146258
Change-Id: I2dd0a66fe2f510f26bdfef6b0a975c1beb3fd93c
Depends-On: Iea0c40bdd7776372ccf72db8f088a2abaa4d3721