| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
- When a transaction lifecycle callback such as
onTransactionPreCommitOrIdle() is invoked by rdbms, rdbms passes in
the DB connection handle the callback was scheduled on.
- However, the DB connection handle may have since been reset to a
different DB domain on the same physical cluster due to connection
reuse.
- We could implement bookkeeping to keep track of the expected DB domain
for each pending callback and ensure the passed-in DB handle matches
that before invoking the callback, but nobody seems to be making use
of the passed-in DB handle except for two call sites in core.
- As such, it seems more prudent to remove this functionality.
What:
- Stop passing the DB connection handle to rdbms transaction lifecycle
callbacks.
Bug: T386190
Change-Id: I9125bfb8b5e2cac4aab3525ffd229ea49beccc17
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
- Listeners that want to skip processing if the page content didn't
change should generally not skip reconciliation requests.
PageUpdatedEvent should offer getters that make this straightforward.
What:
- Add isNominalContentChange that will return false for dummy revisions
but true for null edits. This is the preferred way for listeners to
determine whether they can skip redundant processing of page content.
- Rename isContentChange to isEffectiveContentChange, to distinguish
it from isNominalContentChange.
- Rename isRevisionChange to isRevisionHistoryChange, to make it clear
that the change affects the sequences of revisions.
- Add test cases to PageUpdaterTest asserting the expected update
propagation for null edits and dummy revisions.
- Change ingress objects so that:
- the message cache is updated for null edits
- module caches are not cleared for dummy revisions
Bug: T383552
Change-Id: Idf6625d3e737e4a225648b0fd81cc929b095d315
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: T387051
Change-Id: I10791c2de60acb6c738f311cadd9a14edb58c325
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Why:
- We only want to support a single invocation mode for now.
What:
- Remove handling of invocation modes from EventSubscriberBase and
EventDispatchEngine.
Bug: T387012
Change-Id: Ie1df95f50cdb763fceda5751d6defa665fd114ff
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add a param to the store's resetForm() to not clear internal refs that
are not tied to a specific form field. We call resetForm() with this
option set after a successful form submission.
Add rigorous tests for this flow to ensure no data is leaked from one
block into another.
Bug: T384822
Change-Id: Id9853e10fdfc55ca2e8287cb4bdf20e13b7229eb
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Why:
- We would like to make the user links associated with expired temporary
accounts visually distinguishable from non-expired ones using
strikethrough styling and an information tooltip.
- The designs call for using Codex tooltips for the latter. Using the
Vue directive for this would require us to take a dependency on Codex
and Vue for every page that renders user links, and render a small
Vue.js app for each expired temporary user link, which does not seem
practical.
- We can, however, use Codex styles and implement our own simple tooltip
functionality without taking on unnecessary dependencies.
- This requires adding a new RL module to every page that uses
userLink(), so we should update userLink() to do this for us instead
of having to update every core and extension page that needs this.
What:
- Add a strikethrough to expired temporary account links
as per the design specification.
- Render a tooltip, hidden by default, for expired temporary account
links that is styled using Codex styles.
- Implement a simple jQuery tooltip handler for expired temporary
account links.
- Avoid caching expired temporary account link in UserLinkRenderer to
ensure each of them receives a unique ID.
- Add required ResourceLoader modules directly to the output in
userLink().
Bug: T358469
Change-Id: I4f70ff15becbc4991c4f1b0307a14d5354c79dc1
|
|\| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Why:
- OutputPage::addModules() and OutputPage::addModuleStyles() currently
store added module names in two lists, mModules and mModuleStyles.
- The contents of these lists then get passed to array_unique() when
OutputPage::getModules() is invoked, to filter out any duplicate
module names.
- In I4f70ff15becbc4991c4f1b0307a14d5354c79dc1, we would like to modify
UserLinkRenderer::userLink() to automatically add the requisite
ResourceLoader modules to the output, instead of every page where
userLink() is called needing to do so manually.
This can cause these modules to be added thousands of times when a
large list with many user links is rendered, e.g. on RecentChanges.
- Running `php maintenance/run.php benchmarks/benchmarkEval output.php`,
where output.php holds:
```
$out = ( new RequestContext() )->getOutput();
for ( $j = 1; $j <= 2000; $j++ ) {
$out->addModules( 'ext.foo' );
}
$out->getModules();
```
takes about 4-5ms on my system.
- Turning the properties into associative arrays and getting rid of the
array_unique() call drops this to < 0.2ms.
- These properties are exposed via public property accessors that have
been deprecated since MW 1.38 and have no usages in codesearch.[1]
Since we're changing how the properties work, this is a good time to
remove the deprecated public property accessors.
What:
- Use associative arrays to store module names in OutputPage.
- Document that addModules() and addModuleStyles() take a
string|string[] rather than a string or an arbitrary array.
- Add unit tests for the behavior.
- Drop the deprecated public property accessors for mModules and
mModuleStyles.
[1] https://codesearch.wmcloud.org/search/?q=mModule%5BSs%5D
Bug: T358469
Change-Id: I86c557a4ce7207359d100538c0d4b1ffa75fcbf9
|
|\| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Why:
- After I4f70ff15becbc4991c4f1b0307a14d5354c79dc1, it will become
necessary to prefetch the expiration status of temporary accounts when
rendering user links via UserLinkRenderer for a large list of users.
- We would ideally like to accomplish this without requiring every user
of UserLinkRenderer to take a direct dependency on
TempUserDetailsLookup, which exposes this functionality.
- Since most users of UserLinkRenderer / Linker::userLink() already use
LinkBatch to prefetch page existence for the user and user talk pages
that UserLinkRenderer will link to, encapsulating the
TempUserDetailsLookup interaction within LinkBatch seems like a decent
middle ground.
What:
- Add LinkBatch::addUser(), which takes a UserIdentity and adds its user
and user talk pages to the batch while also triggering a batch lookup
of expiration status for users added this way when execute() is called.
Bug: T358469
Change-Id: Ic837961296cc4bf166dde79c7f073cc50ce925da
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Provide an interface allowing extensions to add global preferences.
Add test for all the $global values.
Bug: T386592
Change-Id: Id982656e228efaa97068b90f5137a0495c86fae5
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Instead of getParser(), which is documented as requiring the caller to
manage relevant state, add acquireParser() and releaseParser().
Add test.
Change-Id: I112a0b6a1ff2e1dfaed7fe8e011872235d126f46
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Why:
- PageUpdater creates an EditResult on null-edits, the PageUpdatedEvent
should also have it.
What:
- Call DerivedPageDataUpdater::prepareUpdate for null edits
Bug: T386938
Change-Id: Ie6e59e0b089a973f338bafb646893e3334d2ea14
|
|\ \ \ \ \ \ |
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Just a few modernizations, utilizing more recent PHP features.
Notable:
* Much more strict language-level types. E.g. it's not allowed to
call newFromNames with a single string any more. (Was never
allowed and doesn't make any sense anyway.)
* Drop unnecessary @covers tags in the test for the reasons
explained in I2678992.
Motivated by I15d9134.
Depends-On: Ia88a8e724bb35781286528fa6403b2fe8ee3cfab
Change-Id: Id90b6838429eca4bd662546e89fb1a91a8ae7c4f
|
|\ \ \ \ \ \ |
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Why:
- When introducing saveDummyRevision() in I1f8c0ac68b, we didn't account
for the fact that most (but not all) dummy revisions should be marked
as minor edits.
What:
- Add a $flag parameter to saveDummyRevision()
Bug: T198297
Bug: T387067
Change-Id: I1db3ccc816cdb0e2a93593625306a9080b7204eb
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The id of blocker was not properly given to formatter. It resulted in treating registered admin userlink as anonymous user.
Change-Id: I9dddb59f430385ad4b24ff009e8cbea2768db0ea
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add a regression test for accidental conversion of block log expiry
times from relative to absolute timestamps.
Bug: T248196
Change-Id: Ie7db802c43b222260074c01bf70a3e9759cef845
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: I9de2c7711fc41f83a0b9e6783fcf085cedb2a9c9
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | / / /
| | |_|/ / /
| |/| | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Why:
- The TSP team would like to adjust the rendering of user links
associated with temporary accounts, depending on whether the temporary
account is expired.
- This requires a mechanism to efficiently retrieve the expiration
status of temporary accounts, even when rendering large lists with
many user links, e.g. Special:RecentChanges or page histories.
What:
- Introduce the TempUserDetailsLookup class and service that holds the
expiration status of temporary accounts in an in-memory LRU cache.
This uses the new UserRegistrationLookup::getFirstRegistrationBatch
API.
- Provide a preloadExpirationStatus() method, similar to GenderCache or
LinkBatch, that allows callers to prefetch expiration status for a
batch of users. A followup patchset will add these to pagers as
needed.
Bug: T358469
Change-Id: I98ec17046c0863878eba3768d83f083bc2753e6f
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Explicitely send the expiry time's timezone (UTC) to the API
to ensure it's interpreted correctly and not as being in
the wiki's timezone.
We should not be showing times in the browser timezone ever.
Bug: T385658
Change-Id: Ia1ef59de192a26105cfecb42841aa4ed2b8938d6
|
|\ \ \ \ \ \ \ |
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Generate the error message in the getLegacyStatus function in the constraint
class instead of EditPage. The submit button label has to be passed to the edit
constraint since the logic for determining it it resides in EditPage.
Bug: T384399
Change-Id: Id2a9ab57198dfa4df07f91b067944e9f9fefb81a
|
|\ \ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Reset the original search limit when performing variant searches, so
that the result set does not get truncated (way) more than necessary.
The `try ... finally` should be unnecessary, but it's generally
advisable to use it to wrap code that messes with the internal state
of a class only to reset it after performing a certain operation.
Add a regression test to verify the fix.
Bug: T386743
Change-Id: I499605b5e0c7b5fc48b919208a1ea3f20fde9d57
|
| |_|_|_|_|/ /
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
MessageCache has enough to do without also being a parser. Split a
MessageParser class out of MessageCache and make it a service.
* MessageCache::parseWithPostprocessing() becomes MessageParser::parse()
because every caller wants postprocessing so it makes sense to use the
shorter name for this.
* MessageCache::parse() becomes MessageParser
::parseWithoutPostprocessing(). I changed the return type from
ParserOutput|string to ParserOutput, which is a followup to
I8a1fa84e650d920d07d74722d8059d5afeedec6b. Narrowing the return type
does not break b/c so it is possible to make this change for both
variants.
* In the new methods, a null title is always a convenience alias for a
placeholder title (Special:Badtitle). This reflects the convention in
Parser::setPage(). The old MessageCache::parse() retains its b/c
fallback to $wgTitle. MessageCache::transform() had the potential to
fall back to the title used in the previous call, a fragile mechanism
which I removed without deprecation.
* For consistency, allow a string language in all new methods.
* In EmailNotification, clean up an early attempt at global state
avoidance.
Change-Id: I05ab21508d5f8394189fd41ac6a2254ac0e0d785
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
In UserLookup, check against the existing list=allusers query to
validate the target instead of firing a separate API request to
list=users. For targets supplied by URL param, pass in blockTargetExists
and set that on the store's targetExists prop.
Validation within UserLookup is now confined to the single validate()
method.
Remove the blur listener which conflicts with the above strategy (i.e.
validate() could get called before the list=allusers query runs). The
blur listener shouldn't be needed, anyway.
This patch also moves the 'nosuchusershort' error to be on the
UserLookup field itself, instead of atop the whole form – something
Design and Product had requested from the beginning.
Finally, update module styles to reflect recent styling changes (such as
T383921) to reduce flashes of unstyled content.
Bug: T380970
Bug: T384712
Change-Id: I8172a13ffb26080b872bbf4b1a5a4f823acf9380
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Why:
- Improve consistency, naming, documentation and definition of flags.
What:
- remove direct access to flags, provide a separate getter for each flag
instead.
- Deprecate EDIT_SUPPRESS_RC in favor of EDIT_SILENT
- Introduce EDIT_IMPLICIT to replace "automated" mode
- Introduce FLAG_RECONCILIATION_REQUEST into PageEvent.
- Introduce isReconciliationRequest into DomainEvent.
Bug: T383552
Change-Id: I2bffbb5810376829f871e1840ca799a8d8232dda
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Why:
- MediaWikiPropagator is currently untested.
What:
- Add unit tests for this class.
Change-Id: I8278b3f49bdd838be6fba9264d666f3d3ba3423d
|
|\ \ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Custom build the active blocks table so that it is rendered with the styles needed to highlight selected row.
Bug: T383846
Follow-up: I683ae53ccf9425138751561128e9cb4e422729f0
Change-Id: If64443a95d09817160e688f250c83f38dd6f4924
|
|\ \ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Why:
* The createAndPromote.php maintenance script can be used to create
accounts, assign passwords to the account, and assign user groups.
* Temporary accounts cannot have user groups (T340468) and cannot
have passwords set or updated.
* Given this, the createAndPromote.php maintenance script can
only auto-create a temporary account which does not seem to
be needed, as this can be done by making an edit.
** Attempting to assign user groups to a temporary account using
this maintenance script currently throws an exception, so
as it stands the script needs to be fixed.
* Therefore, the createAndPromote.php maintenance script should
reject any attempts to create or update groups / passwords of
a temporary account.
What:
* Cause a fatal error if the createAndPromote.php maintenance
script is called with a username matching the temporary account
name format.
* Add tests for this new behaviour.
Bug: T386775
Change-Id: Iad622d903fe685f98bcb33470ce2042bacb4fe4e
|
|\| | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Why:
* Temporary accounts are automatically created when a user makes
an edit, and therefore do not have a password set by the user
who created the temporary account
* Currently, there is no limitation that prevents a password being
set for a temporary account.
** This means that the createAndPromote.php maintenance script
can set a password for a temporary account or create a new
temporary account with a specified password.
* A temporary account having a password allows a user to login to
the account, even after the account has expired.
** This should not be allowed, and as such we should reject any
attempts to set or change the password for a temporary
account.
What:
* Update User::checkPasswordValidity to reject any password
provided if the user matches the temporary account name format.
* Add tests for this.
Bug: T386775
Change-Id: I5354d240678fca9dbf3ed699370cf1a4df96b2f9
|
|\ \ \ \ \ \ \ \ \ |
|