The service has an early return already and the performance overhead
of scheduling, executing and instantiatingn the service and its deferred
update is extremely low.
But, it makes the overall system harder to reason about when execution
always runs through here. And it helps developers to isolate problems
and improve fault tolerance by being able to properly turn this off
if it or its dependencies are causing issues for whatever reason.
The dependencies it uses are quite core to MW, and so their issues
should not be ignored, but it makes the difference between a site
mostly working for readers and a site completely being down, because
on a stock MW install, Pingback is the only feature that uses
DeferredUpdates on regular page views by default.
Bug: T270540
Change-Id: I0d5da6bf3affdf8ab27239ef77fb8cfd87aa70d0
* Inject dependencies from the constructor and use those instead.
* Make getSystemInfo() static since its sole purpose is to collect
global state. This also means it can be safely called from the
Installer without needing to construct this class and its unsafe
dependencies as the Installer was doing previously.
* Remove private 'id' member. This cached the fetchOrInsertId()
return value but was never used.
* Remove selectField() fallback IGNORE-mode insert from fetchOrInsertId().
This existed to handle concurrent writes, but this isn't possible
since all this runs inside a DB_MASTER lock.
* Add missing call to $cache->makeKey().
Avoid passing unformatted strings directly to BagOStuff methods.
Bug: T270540
Change-Id: I984526020ea4d5f0fd6f72b6be527edaf6ab0917
- Arrange the methods in order of execution.
- Provide a single run() entrypoint for testing
(added in the next commit).
Bug: T270540
Change-Id: I27369de38a033397aa15e3a7aba7a034dd1c94f3
This patch adds a private method and other mechanisms to handle
generation of dismiss button for site notices (which are already
generated by core).
It also adds the $wgDismissableSiteNoticeForAnons global with its
default as set in the DismissableSiteNotice extension. The plan is,
however, to deprecate it later.
Native support will streamline the sitenotice processing and helps
towards more optimum default MediaWiki experience. It will also
eventually obsoletes the need for an extension to provide this crucial
button as well as remove the overhead of managing such extensions.
Bug: T262118
Bug: T259903
Depends-On: Ib80fc24c84eb333daa016c9816fdf91cc60d3983
Change-Id: I276325dc55fd475655e0212fc256b95ebb41b276
Two minor improvements to parser tests:
1) Tweak the filetype of the djvu file to match what commons reports
nowadays for a more relevant test
2) Allow capital 'E' when registering an extension requirement in the
`!! hooks` clause of a parser test file.
Bug: T254181
Change-Id: Id4dcd0f5d040f4deb5235d565119a6f76cc7b59d
This patch implements the BanConverter class for Balinese. Its purpose is to transliterate Balinese in Balinese script to Latin script. Latin to Balinese is not currently supported, because (1) the Latin transliteration is not fully one-to-one, (2) I'm not aware of any users who currently need Latin to Balinese.
The converter supports three distinct Latin transliteration variants: ban-dharma, ban-palmleaf, and ban-puri-kauhan-ubud. All three variants have been requested by different Balinese community members working with Balinese palm-leaf manuscripts. ban-puri-kauhan-ubud is the default, as it is the most familiar to lontar scholars, but Balinese Wikisource users will be able to select their preferred variant via a user script.
Conversion is accomplished via ICU Rule-Based Transliterators, bindings for which are available through the Intl extension.
This patchset adds the abstract class LanguageConverterIcu and has BanConverter inherit from it (makes future ICU-based LanguageConverters easier).
Bug: T263082
Change-Id: Ic3a46a215fbf020a022726e6b130b1d25496e284
The InterwikiLoadPrefix hook isn't compatible with Parsoid, as it is
unidirectional and doesn't support enumerating all valid prefixes
(T270444). Set/reset $wgInterwikiCache to mock the interwiki table
for parserTests and other unit tests instead.
This is a soft deprecation, as the used-in-production
Extension:Interwiki still uses InterwikiLoadPrefix, although not in a
way that would break Parsoid (since $wgInterwikiCache is set in
production).
Bug: T270444
Change-Id: If2507017c99c4ee42c104a0890bc45a84d7239d5
With the abstract schema changes, indexes will now commonly be
renamed in group for the entire table (the single schema change).
Currently we are mis(using) DatabaseUpdater::renameIndex() which
was not meant for doing this and looks quite suboptimal.
In addition, because the renameIndex() method was purposefully
written to deal with a single index, the messages it prints
during the update become misleading and there's no reason for
to be so.
Change-Id: I04d93e13456cfbfbd46e922af3b6c4026cc36544
To follow database coding convention and avoid clashes in RDBMS engines
where indexes are global
Bug: T270033
Change-Id: I17028bba489d04b01d22c39dc8935a4f0f771c7e