| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I78caeb1d76aebcf3e8c6ba48128078a0bbec520c
|
|
|
|
|
| |
Bug: T277987
Change-Id: Ic14f38e0e60bd156d1ff04392e65eeceb3ba77b2
|
|
|
|
|
|
|
|
|
| |
This is no longer needed in Wikimedia production. Third
party users will have had a release to adjust to one of
the three called-out migration issues. It's time.
Bug: T277987
Change-Id: Ia4a797afc71441ed9a7a90ff4f1e72cc4495cf63
|
|\
| |
| |
| | |
is docroot"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a wiki is installed with its script path as the document root,
then WikiModule would pass MediaWiki's wgScriptPath value (empty string)
to CSSMin as base url, which is invalid.
A similar bug was recently fixed in FileModule with I16abf482e3a1a.
Bug: T282280
Change-Id: I0b9a67aa912eb3a0320631027303cedf3f348bb8
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rename to `rev_page_timestamp`
Bug: T270033
Depends-On: I16fc273b14e7f4b00e8c31ec1ed7712149aafe37
Change-Id: I93fcfb3caf8c6bd7f9e46921065b751c23571ae1
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The help link will show up on Special:SpecialPages if the helplink of
Special:SpecialPages is disabled.
It also using global context on the message parse inside the function
when used in constructor
Change-Id: Ia7baee93cffe565d894960d2c7ab86085197b241
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The parsing of the timecorrection useroption was split over multiple
classes. Combine into a single class and add some testcases.
Change-Id: I2cadac00e46dff2bc7d81ac2f294ea2ae4e72f47
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently all the signal constants emit warnings as they are undefined
in PHP 7.4 and throw fatal error in PHP 8, if pcntl is not available.
pcntl extension is not enabled by default, and is not required by
MediaWiki, so this class should throw a better error if it's not
found. The class already has comment that pcntl and posix are required
but this is meaningless since the error and a warning for each constant
would be emitted anyway.
https://www.php.net/manual/en/pcntl.installation.php
Convert RESTARTABLE_SIGNALS constant back to static property as it was,
because we can only use these constants after confirming they exist,
which happens in the constructor.
Bug: T280456
Change-Id: I66deaa9b346b936b2628ac0511492d20a42fea6c
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This ensures tests can run from phpstorm directly, without MediaWiki's
custom phpunit wrapper.
Background:
$wgCanonicalNamespaceNames needs to be declared in DefaultSettings so
it works properly when Setup.php is included via
wfRequireOnceInGlobalScope, as is the case in
MediaWikiIntegrationTestCase::initializeForStandardPhpunitEntrypointIfNeeded.
wfRequireOnceInGlobalScope will import any variables in the global scope
into the local scope to make them available in the included file. It
also exports all variables declared in the scope of the included file to
the global scope, but only after the file includsion returns.
If $wgCanonicalNamespaceNames is not defined in global scope before
Setup.php runs, then the $wgCanonicalNamespaceNames variable defined in
Setup.php will not become global until after Setup.php finishes.
However, Setup.php instantiates services that need
$wgCanonicalNamespaceNames to be present. This causes the test framework
to fail.
Change-Id: I8c5179433737170303f37cb072cb0352006ca173
|
|\ \ \ \ \ \ |
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
LinkBatch used to be lenient about receiving null or invalid titles.
This patch restores this lenient behavior.
Bug: T282180
Bug: T282070
Change-Id: I2c6378a3a0d508c77bcb290a6ed07f4d5f96d62c
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Don't show namespaces or actions that are not active (eg. uninstalled
extension) in block information
Bug: T280798
Change-Id: I14fa7006b3d46eeb41d53216c5203d294fff6338
|
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | | |
Bug: T281337
Change-Id: I2e8d18b2fc10509097f66287b2543217f4eb9b6a
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: I9bc1cdefed392f541d9ff05d273e14f000debc68
|
|\ \ \ \ \ \ |
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Otherwise it tries to scan the whole logging table, joining every row on
actor.
Bug: T282122
Change-Id: Ia34897a496656e0d0d26f9e038b1edb0377c461e
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
LinksUpdate may encounter a non-existing page due to race conditions,
when the page has been deleted or renamed before the update is executed
or even created. We should log such incidents to detect anomalities,
but we should not crash hard.
Similarly, RefreshLinksJob should not attempt to run on a page that
no longer exists.
Bug: T281802
Change-Id: Ic73c3e339ff0478710bd57a9f707c1284dcce2d9
|
|\ \ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Change-Id: I4b6f07e8c8b3915c780885083f7465790328d2a3
|
|\ \ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The user 'Maintenance script' is often used to perform various
automated tasks. Providing it everywhere as a string literal is
error-prone, and errors can be somewhat disruptive (e.g. with
User::newSystemUser with steal=true it can erase the credentials
of a legitimate account). Provide a constant instead.
Also replace existing uses for consistency.
Change-Id: I685a5bfe56bbf1a47f35072f7f7c8be320ee27db
|
| |_|_|/ / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Same issue as in Ifbdb24ff5b99b9ec12cb313c48227563696c48c9
Bug: T282181
Change-Id: I166ef428932136b8466610b8accb78ec6ccdf757
|
|\ \ \ \ \ \ \ \ |
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
… whilst we fix auto-subscription. Hopefully.
Bug: T281549
Change-Id: Ifa2e46ee668e51caf87eeca34bec123511595c50
|
|\ \ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
For every table except revision, the use of ActorMigration was "soft
deprecated" in 1.34. Now, hard deprecate it.
Bug: T278917
Change-Id: I63d26d13026214d84b6b94f06b4ad0d2362d97ed
|
|\| | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
AbuseFilter needs a class which is almost identical to core's
ActorMigration, so I split out the generic facilities into
ActorMigrationBase, leaving the bits specific to core in ActorMigration.
I changed the way fields and tables are specified so that it's easier to
override in subclasses.
Proper injection of ActorStoreFactory in
ActorMigrationTest::testGetWhere() was necessary to avoid a test failure
due to a teardown issue.
Bug: T278917
Change-Id: I3a6486532f2ef360d1fd01b3a609de71d412f739
|
|\ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Change-Id: I79ee0a8d357913f64578cf38cf17d969b6661153
|
|\ \ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Change-Id: I585f0f23cac5f6dc2a4879f69f7b83828fda3dd3
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Change-Id: I1786595aba5f439b6fdfcd8f4fee1ba0fc518c9b
|
|\ \ \ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Catching common issues here instead of where the caller expects breaks
log formatting, including complete breakage of Special:RecentChanges.
The doc comment says that validation is the caller's responsibility,
which seems like a good idea to me.
Bug: T282070
Change-Id: Ic7e5c5576564e61906a812d50ea4e48adf5ac998
|
|\ \ \ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / / / /
|/| | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Document the fact that EditPage::$edittime can be null, and guard
against a type mismatch error in getExpectedParentRevision() which is
hit if EditPage::$edittime is null and EditPage::$editRevId is a value
that is false when converted to boolean.
Bug: T277204
Change-Id: Ibc9500a314ddfd99452d6c03d8906f69cdebc0e4
|
|\ \ \ \ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
== History of WikiPage::triggerOpportunisticLinksUpdate ==
* 2007 (r19095; T10575; b3a8d488a8)
Introduces the "cascading protection" feature.
This commit added code to Article.php, in a conditional branch
where we encountered a ParserCache "miss" and thus have done a
fresh parse. The code in question would query which templates
we ended up using, and if that differed from what the database
said (e.g. stored during the last actual edit or links update),
then a new LinksUpdate is ad-hoc constructed and executed.
I could not find it anywhere explicitly spelled out, but my best
guess is that the reason for this is to make sure that if the page
in question contains wikitext that trancludes a different page based
on the current date and time (such as how most Wikipedia main pages
transclude news information and "Did you know" information based on
dated subpages that are prepared in advance), then we don't just
want to re-render the page after a day has passed, we also want to
re-do the links update to ensure the search index, category links,
and "WhatLinksHere" is correct, and thus by extent, to make sure
that cascading protection from the main page does in fact apply
to the "current" set of subpages and templates actually in-use.
* 2007 (r19227; 0c0c0eff81)
This adds an optimisation to the added logic that limits it to
pages that satisfy `mTitle->areRestrictionsCascading()`.
Thus for most articles, which aren't protected at all, we don't
run LinksUpdate mid-request after a cache miss page view.
Because of this commit, the pre-2007 status quo remained unaltered
and has remains unaltered to this very day: We don't re-index
categories and WhatLinksHere etc, unless an article edit or
propagating template edit takes place.
* 2009 (r52888; 1353a8ba29)
Introduces the PoolCounter feature.
The logic in question moves to Article::doCascadeProtectionUpdates().
* 2015 (Iea952d4d2e66; df5ef8b5d7).
The logic in question is changed, motivated by wanting to avoid
DB writes during page views.
* Instead of executing LinksUpdate mid-request, we now queue a
RefreshLinksJob on the JobQueue, and utilize a newly added
`prioritize => true` parameter.
This commit also introduces a new feature, which is to queue
RefreshLinksJob also for pages that do not have cascading
protection, but that do satisfy a new boolean method
called `$parserOutput->hasDynamicContent()`, which is set when
the Parser encounters TTL-reducing magic words and functions
such as {{CURRENTDAY}} and {{#time}}. For this new case, however,
the `prioritize` parameter is not set, and this feature is disabled
in WMF production (and other farms that enable wgMiserMode).
This commit also renamed doCascadeProtectionUpdates()
to triggerOpportunisticLinksUpdate().
This commit also removed various documentation comments, which
I've partly restored in this patch, the patch you're looking at
now.
== Actual changes ==
* Rename hasDynamicContent() to hasReducedExpiry() and keep the
previous method as a non-deprecated wrapper.
This change is motivated by T280605, in which I intent to make use
of a Parser hook that reduces the cache expiry. There are numerous
extensions in WMF production that already do this, and thus the
assumption that these have "dynamic content" is already false in
some cases. I'm not yet sure how or if to refactor this so to allow
reducing of the TTL *without* causing this side-effect, but as a
first step we can make the method more obvious in its impact
and behaviour.
I've also updated two of the callers that I think will benefit from
this more explicit name and (current) implementation detail.
Bug: T280605
Change-Id: I85bdff7f86911f8ea5b866e3639f08ddd3f3bf6f
|
| |_|_|/ / / / / / / / /
|/| | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Bug: T274174
Change-Id: Ia81e64fa99154f43d27bfe070df03686eb4469c5
|
|\ \ \ \ \ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Duplicate action codes (eg. extensions assign colliding action ids)
will caused unexpected partial blocking behavior. This lets someone
know that there's a duplicate by throwing before that happens.
Bug: T281915
Change-Id: I34cab4360d40805a9259cf6f2b4cbf05cee6184c
|