| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
I believe the code is quite a bit more readable like this. There is
less indirection and less duplication. The tests still do the same
as before.
Change-Id: I501ccee89b37e2338bc07af3024a75f0e45e05b3
|
|
|
|
|
|
|
|
|
| |
This reverts commit 1695950bccb1ca7eba98952753708ae7c4b76d8d and re-applies commit I8f3c2ea021d0f6e.
Reason for revert: the remaining usages have been updated in Ida665f486eff384.
Bug: T166010
Change-Id: I43f06e6872b264e43aef7fa7c2ac47159926a694
|
|
|
|
|
|
|
|
|
| |
This reverts commit db47e7f7154a2121bce6d3d9e93a74486bf765f3.
Reason for revert: Broke scap sync-world in beta, and possibly caused T387938
Bug: T166010
Change-Id: If608c3e27081bb36b284ad16a5b912dd51b3557e
|
|
|
|
|
|
|
| |
Bug: T166010
Depends-On: Iba93dd9749656e641c427e01790d7a14cd1a2dc2
Depends-On: I97ccc2c49ce09ca96192bf6ffdc833c1765c3faa
Change-Id: I8f3c2ea021d0f6e574dde901f0bfd4a0408f5455
|
|
|
|
| |
Change-Id: Ic5f178b202574b937169a47faf1566bd62bf6ad3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RevisionRecord::getPage() returns a PageIdentity, which may
be a Title or a WikiPage. In the context of an ongoing page deletion,
the state of these objects may change and the page ID may get set to 0.
To provide a reliable stable interface that can be used e.g. in a
deferred update or job, we need to return an immutable value object
instead.
NOTE: this may break callers of getPage() that downcast to Title,
or that rely on the page ID contained in the returned PageIdentity
to be updated dynamically during page creation or deletion.
This is a modified version of I7440f8f30b05949. It reverts I4ed5406a8b3aa9, which reverted the original patch. The main difference
to the original patch is the additional check in the constructor of the
RevisionRecord base class and the regression test in SignatureValidatorTest.
Bug: T380536
Change-Id: I0ea915983b6187090f46ad23c9b582196b4be85f
|
|
|
|
|
|
|
|
| |
Changes to the use statements and some additions
are done automatically via script
This also updates @covers tag for the namespaced classes
Change-Id: I859ba6d05018c99710b744e2becab432410d3bca
|
|
|
|
|
|
|
|
|
|
| |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: Ifc27750207edc09e94af030d882b6f1a5369cf98
|
|
|
|
|
| |
Bug: T353458
Change-Id: Ifa3b6a6e0353bb4ce21a3f4456f1fc696c8d377c
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code was partially copied into MassMessage and will hopefully
enable more places that accept arbitrary wikitext to check lint errors.
It also hides the internal details of checking with the Linter
extension's configuration in one place until it can be refactored into
something more acceptable (T360809).
Bug: T368690
Change-Id: Iaeb3ccbd61a2a8cb0d8b3dc8b06a3a10bc8fa653
|
|
|
|
|
|
| |
Bug: T361858
Follows-Up: I0983aebfd435ab76191c232ecb543a9f0e42d778
Change-Id: If6812e77fd1e689aa3d11901f666a56b753f43eb
|
|
|
|
|
|
|
|
|
|
| |
Ie09865d333cbc8df52edb46e7f00743fe94a6174 modifies the linter such that
null values are not dropped anymore. This patch temporarily ignores a
test whose behaviour is modified so that we can merge vendor patch and
then reactivate the (modified) test.
Bug: T361858
Change-Id: I0983aebfd435ab76191c232ecb543a9f0e42d778
|
|
|
|
|
|
| |
Bug: T360809
Bug: T360796
Change-Id: Ia3512b5e7bb6eae6bfa9b9ae67611a9f977e6bb3
|
|
|
|
| |
Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
|
|
|
|
|
|
|
|
|
| |
I wrote this code before it was feasible to call Parsoid directly from
MediaWiki code, but now it is, so let's get rid of all this indirection.
This lets us add tests for this without mocking the whole world.
Change-Id: I32fea6d0e309ca6f06b3a249fba6e9a311057ce4
|
|
|
|
|
|
|
|
| |
Mock the needed services, or set fixed values to avoid DB lookups, when
possible. Add the test to the Database group otherwise, e.g. for things
like Skin and Parser that use global state all over the place.
Change-Id: I8d87013d89accaf04d0ac19cb4b7216290383eb5
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just methods where adding "static" to the declaration was enough, I
didn't do anything with providers that used $this.
Initially by search and replace. There were many mistakes which I
found mostly by running the PHPStorm inspection which searches for
$this usage in a static method. Later I used the PHPStorm "make static"
action which avoids the more obvious mistakes.
Bug: T332865
Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
|
|
|
|
| |
Change-Id: Iefc05b4f4a9c258a385a22fc8d87b29648900e44
|
|
|
|
| |
Change-Id: Ib8df0e76b81c8f3ad592f1caa3be86ac3597a0cf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0
The following sniffs now pass and were enabled:
* Generic.ControlStructures.InlineControlStructure
* MediaWiki.PHPUnit.AssertCount.NotUsed
npm:
* svgo: 2.3.0 → 2.3.1
* https://npmjs.com/advisories/1754 (CVE-2021-33587)
Change-Id: I2a9bbee2fecbf7259876d335f565ece4b3622426
|
|
|
|
|
| |
Bug: T272322
Change-Id: Ieac8be8839915a1ec4d547c2fc15d5fa9b27aca9
|
|
|
|
| |
Change-Id: Ic663e81cca0bf007804a70772250914a85f1fef4
|
|
Three new checks are now applied to user signatures in preferences:
* Disallow invalid HTML and lint errors (T140606)
Since 15e0e9bb4b we can rely on Parsoid to check the signature for
lint errors. (The old PHP Parser doesn't have this capability.)
Most importantly, this will disallow unclosed HTML tags. Unclosed
formatting tags like `<i>` (and also wikitext markup like `''`)
could affect the entire page with the bad markup.
New configuration variable $wgSignatureAllowedLintErrors is added
to allow ignoring some errors. The default value ignores the
'obsolete-tag' error (caused by HTML tags like `<font>` and `<tt>`.)
* Require a link to user page, talk page or contributions (T237700)
Various tools don't work correctly when such a link is missing. For
example, Echo notifications are not sent, DiscussionTools will not
allow replying to these comments, English Wikipedia's SineBot treats
these comments as unsigned.
Such requirement has been present for a long time in many Wikimedia
wikis' policies, but it was not enforced by software.
* Disallow "nested" substitution in signature (T230652)
Clever abuse of "subst" markup and tildes allows users to save edits
containing wikitext in which substitution occurs again when the page
is next saved. Disallow this in signatures, at least.
New configuration variable $wgSignatureValidation is added to control
what we do about the result of the validation described above. The
options are:
* 'warning':
Only displays a warning near the field on Special:Preferences if
the current signature is invalid. Signatures can still be changed
regardless of validity and will be used when signing comments.
* 'new':
In addition to the above, if a user tries to change their signature,
the new one must be valid. Existing invalid signatures are still
used when signing comments.
* 'disallow':
In addition to the above, existing invalid signatures are no longer
used when signing comments.
Bug: T140606
Bug: T237700
Bug: T230652
Change-Id: I07c575c2d9d2afe7a89c4847d16ac044417297bf
|