Replace WikiPage::factory with a proper factory object with dependency
injection (only for dependencies needed by the factory methods,
not WikiPage itself).
Change-Id: Ie7d6e40d8387d8bc4f8592a31fdd70d0aad510ae
> A long, long time ago,
> I can still remember how those warnings used to make me smile.
> And, I knew if I had my chance, that I could make those traces dance,
> and... Maybe they'd be present for a while.
Ever since T45086, we have traces for warnings in production
so this is no longer needed. Also it uses getTraceAsString()
which is something we're trying to phase out.
Bug: T233342
Change-Id: I79ce582c7f057b22a9ead2f2b014aba41f869325
In DatabaseInstaller::stepApplySourceFile(), the output format
of the error message is `config-$stepName-tables-exist` and
`config-$stepName-tables-failed`. Fix `config-install-tables-manual-exist`
and `config-install-tables-manual-failed` to `config-install-manual-tables-exist`
and `config-install-manual-tables-failed`
Bug: T257765
Change-Id: Iabd71b897aa373becc8b2813dde07847b04ad230
We were using the master to load revision data from the revision
table, but not when loading slot data. We should use the master DB for
both, consistently.
Bug: T258666
Change-Id: I800adb852ec690b63fa926f40428de3272d69584
The last constructor parameter is now mandatory.
Depends-on: Ifd5dbc2b947533a5e926c581e1c5a67e4af147dc
Bug: T220525
Change-Id: I47071440a9696f18568e542fe6eee32843c28210
It caused a 20% latency regression by unconditionally parsing extension.json
files on every single load instead of using the existing caching
infrastructure. There are further problems with the use of parsing/loading
extension.json files in a method that is incompatible with the existing
architecture.
This primarily reverts commit 46eabe275c.
Also needed to revert 16381261ae and 7c72347ec1.
Bug: T258664
Change-Id: I34a783c3f0df0447876a26441bb2d12e02368871
Use a unique key to assign handlers registered via
scopedRegister(). Using unique keys instead of
array indices ensures that handlers registered in other
ways previously (e.g. via global hook registry or via
HookContainer::register() won't be removed).
Remove the temporary hook for AlternateUserMailer
as the ticket it references is for a class that
no longer exists
Bug: T255056
Change-Id: I491f281e60511a5bdd695ac123611e408324ccff
This causes RevisionStore to use FallbackContent instances to represent
content for which no content handler is defined.
This may happen when loading revisions using a model that was defined
by an extension that has since been uninstalled.
Bug: T220594
Bug: T220793
Bug: T228921
Change-Id: I5cc9e61223ab22406091479617b077512aa6ae2d
Extensions have the ability to inject their own idea of what
a contribution is into the ContribsPager query resultset (via
the ContribsPager__reallyDoQueryHook). Because of this,
stable chronological ordering of ContribsPager results
becomes virtually impossible
For the purpose of the User Contribution REST endpoints, we will
restrict the resultset to ONLY mediawiki revisions for now.
This patch renames 'revisions' to 'contributions' and adds the
'type' field to future-proof work on adding different kinds of
contributions to the User Contribution REST endpoints.
Bug: T257838
Change-Id: I1e6de1c14a5f47e0310df86325fa6d791833addb
For some use cases (e.g. UserContributions endpoints (T235073) )
we do not want extensions to be able to inject their own
contributions into the result set of ContribsPager.
This is because extensions may not be adding revisions, but
other types of 'contributions'. With the hook enabled,
we are unable to reliably enforce strict chronological
ordering of contributions. (See T200259 for explanation).
Disabling the hook provides a consistent set of revisions for the
User Contribution endpoints.
Bug: T257839
Change-Id: I239395c572d4cb32a4d9ee871ffa02accfdce837
* OO.ui.infuse is now called only if the dom element exists
* mediawiki.action.edit.watchlistExpiry module is only added if
watchlistExpiry is enabled and the user is logged in
Follow-up: Ice5113a97b1ef97253bfa
Bug: T258443
Change-Id: Ie1f2f9efa44ce1d723e2510170d457ead8b0fbbb
This is basically a workaround for T163277 and T170996: it’s hard to
tell whether the IDs returned by a CentralIdLookup are actually safe to
use cross-wiki or not, so add a factory method which only returns a
CentralIdLookup that can be expected to provide cross-wiki IDs, and
otherwise gives up and returns null.
This is a port of the Wikibase CentralIdLookupFactory class, originally
added in change Ie7b9c482cf by Matthew Flaschen.
Bug: T258390
Change-Id: I903c126be413608bd366875ecc7ac007d4da8e3f
According to T248061 the basic support for IE8 is gone now meaning we
don't need to serve the snippet for html5shiv anymore.
Also dropping the html5shiv code.
Bug: T248061
Change-Id: I1a8dbd72ae68f518f52a76a80a3b54239720d20c
Previously null edits were not properly marked in EditResult objects
provided by the PageUpdater. This change should fix it, by ensuring
the original revision ID is always set on the EditResultBuilder if
the edit is a null edit.
I've also added some code to test this, so we hopefully don't
encounter an issue like this in the future. :)
Bug: T257766
Change-Id: I04bb058c64483967617958d86aa40a67c31071cb
Unless it's an intentional deviation, everything in v2 should also be in v1.
This copies over:
* e71e025aba: Add 'ParsoidModules' ...
* 7abd828ea3: Extension schema updates for HookContainer
* 34bff221ba: Introduce 'MessagePosterModule' extension attribute
* e97f2943f2: QUnitTestModule should support packageFiles and templates
** d50c7f5b56: Fix schemas for 'packageFiles'
** ee1f4f8ea3: Fix schemas for 'templates'
* 3f0056a252: REST API initial commit
Change-Id: I1ae6fed0261ad29ea5cb39b3511b8cde392ab612
Parsoid 0.12.x releases will be for MediaWiki 1.35.x and we've started
a new minor version for MediaWiki 1.36.
Depends-On: I13ff232f4ecfb1d072cbeda6d00eedffa65d3bd2
Change-Id: Ife86fed25de108cf4e401f9b2ec6d64190ec3411