| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The doc block is identical to the type declaration for each argument.
Change-Id: I8281b94351fe2be30344f1425a60f31fbf205100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* Some contributions special pages and APIs accept an IP range
target, with a configured limit, RangeContributionsCIDRLimit.
* ContribsPager::isQueryableRange is a static utility method
for checking an IP range against the limit. This is an
awkward place to have the utility, which is needed in other
places, e.g. ContributionsSpecialPage.
* Now that contributions pages in the CheckUser extension also
need to use it, it is a good time to move it to an
includable trait.
What:
* Introduce ContributionsRangeTrait, with methods for checking
the validity of an IP (range) target against the configured
limit.
* Use the trait in ContribsPager and ContributionsSpecialPage,
and remove the static method ContribsPager::isQueryableRange,
which was marked internal.
* Don't yet use it in APIs, to contain the scope of this
commit.
Bug: T378111
Change-Id: I77cf1873f681b426523f62f2806ecde35fc5cc45
|
|
|
|
|
|
|
|
|
|
|
| |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|
|
|
|
|
|
|
|
| |
This reverts commit e6fb3df2a639ca95afdec2255f1da63187ba71c6.
This re-instates I08a5d39036047484e3b44fcd83989072006b88e2.
Bug: T363358
Change-Id: I847c60a493d9973554ceb1232f3799c42321ee2b
|
|
|
|
|
|
|
|
|
| |
This reverts commit c973e8d5191c3f7a3577aed6c1455b8846625cfc.
This re-instates Icdbbb3523de6479f5645c4c9988147290c839c50.
Bug: T363358
Change-Id: I72f0bb23f6469fe5aef44a7bfaf7370d16ff6fb4
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 67eedd7833a6cb9423ed5df7887ebfe0da5b8c8c.
Reason for revert: needed to revert parent breaking change,
which caused T364569
Bug: T364569
Bug: T363358
Change-Id: I1a2885cfcca3594aa97c5222622b8277149570a7
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit e1ffed0af6937576e2bb267786d0608a201e7531.
Reason for revert: breaking change, caused T364569
Bug: T364569
Bug: T363358
Change-Id: I08a5d39036047484e3b44fcd83989072006b88e2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* For the temporary accounts project, we will make some changes to
how user contributions can be viewed, including showing global
contributions (T337089) and showing contributions from temporary
accounts using the same IP (T358852).
* We will create new pagers that re-use logic from ContribsPager.
These will behave similarly to ContribsPager, but will get the
revisions using a different query.
What:
* Make ContribsPager extend a new abstract parent class,
ContributionsPager.
* ContributionsPager:
- handles filtering on edit type (minor, etc), namespace, tag,
date and user permissions (e.g. hiding suppressed revisions)
- runs the hooks that ContribsPager used to run, and keeps the
same names for backwards compatability
- handles displaying results
- provides an abstract method getRevisionQuery for a subclass
to specify where the revision comes from. (Examples are
the `revision` table or the `cu_changes` table, but in the
future this could also include archive.)
* ContribsPager:
- handles an IP range target by using the ip_changes table
- includes some public static functions that are kept for
backwards compatability. (Future work could put them somewhere
more appropriate.)
Scope:
* ContributionsPager is designed to select (existing) revisions.
It could be abstracted out further to handle deleted revisions
from the archive table, to help bring feature parity to
Special:DeletedContributions. This is left out of scope for this
patch.
* To keep the scope limited and the commit history clean, this
patch doesn't attempt to fix the various TODOs in ContribsPager,
or update old styles that are used.
Bug: T363358
Change-Id: I85bb28c9d85426ecc82c533a0cdd3f010c247b02
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* For the temporary accounts project, we will make some changes to
how user contributions can be viewed, including showing global
contributions (T337089) and showing contributions from temporary
accounts using the same IP (T358852).
* We will create new pagers that re-use logic from ContribsPager.
These will do almost the same as ContribsPager, but will get the
revision from a different table.
What:
* This patch prepares for separating out a parent class that will
do most of the work that ContribsPager currently does.
* Split out getRevisionQuery from getQueryInfo, so that a subclass
can fetch revisions using a different table.
Scope:
* ContrbsPager hasn't been updated to use a SelectQueryBuilder.
Updating this is kept out of scope for this work, since this is
a high traffic page with a complicated query that has a history
of becoming slow when changed (see existing comments inline).
Bug: T363358
Change-Id: Icdbbb3523de6479f5645c4c9988147290c839c50
|
|
|
|
|
|
|
|
|
| |
This cases cannot benefit from the SelectQueryBuilder as each argument
get processed by hooks with fix signature or coming from abstract
functions providing the arguments separate.
Bug: T344971
Change-Id: I6490caae3984efaae81bd2583220a7dd1c3b371d
|
|
|
|
|
|
| |
Replace BETWEEN with >= and <= operator
Change-Id: Ic21b6f4cc11c773c967d9d4c5f20e762c2ff9629
|
|
|
|
|
|
|
|
|
|
| |
getTagFilter is already a public method, but it's not that useful
without getTagInvert, which returns whether the tags should be
included or excluded.
This is done now because it is needed for If6747a5134d6553647.
Change-Id: I87bc57dbc193aa42293fcda66092dff40d533b33
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* ContribsPager accepts an IP range as a target. In this case, the
author of each revision is different from the target (the author
is an IP within the range, not the whole range). ContribsPager
therefore adds user links to the revision line, so the user can
see the author of each revision.
* Currently, ContribsPager only does this for an IP range, since
that is the only example known to core of an author not matching
the target. However, extensions can modify the query conditions,
so may return results where the author isn't the target. Instead
ContribsPager should just add the user links whenever the author
is different from the target.
* For an example of an extension changing the query, see T361866.
What:
* Add the user links to a revision line if the author is different
from the target, instead of checking for an IP range target.
Bug: T361869
Change-Id: I80b9c944f73cd8fe27cd54fd27cd9f6c33c92744
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|
|
|
|
|
|
|
|
|
|
| |
Some less trivial cases. Also update variable names.
This doesn't really change anything, but I hope it helps promote
getConnectionProvider() as the common way to do this.
Follow-up to 8604c384f624273f46b653ec252ffaed30e6ff89.
Change-Id: I6657d783375fac5c7fa856b884ff1fb09285e94c
|
|
|
|
|
|
| |
Most noisily, this enables MediaWiki.Arrays.OneSpaceInlineArray.
Change-Id: I8ab11399c67ce7e3ab1b6249b591452774393428
|
|
|
|
|
| |
Bug: T166010
Change-Id: I4066885a7ea071d22497abcdb3f95e73e154d08c
|
|
|
|
|
| |
Bug: T166010
Change-Id: Id13dcbf7a0372017495958dbc4f601f40c122508
|
|
|
|
|
|
|
| |
One of the big ones, so doing this alone.
Bug: T166010
Change-Id: Ibe103cd362535d3cb94cb8931e95fc74099d1497
|
|
|
|
|
|
|
|
|
|
| |
They're under 'specials' because that's where they're mostly used,
but they're just another kind of Pager (shown by their use outwith
the MediaWiki\Specials hierarchy, which is a bad code smell for us
to review later).
Bug: T166010
Change-Id: Iad3f91582b723c1e6679525aa852ffdfd8c6d5ba
|
|
|
|
|
| |
Bug: T166010
Change-Id: Ibe12d1754709d48f71edd4cde1f13a542344a21e
|
|
|
|
| |
Change-Id: I6d2fba4aed30d7767474ec6ffc58ac728e6e67d5
|
|
|
|
|
|
|
|
| |
Also, make ContribsPager::isQueryableRange() static to avoid premature
access to SpecialContributions::getPager() when its $opts property
is not fully populated.
Change-Id: I80145fb71ed205b0ae52955e48739ac4bcbc0a83
|
|
|
|
| |
Change-Id: I1a4224eac8bad47f7228faf68ea7f9c7d44a44ad
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I635eaf947280fd1071e308b19715d581e1c1cb15
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the idea promoted in a468534 to Special:Contributions.
If a user uses an external tool (or just the visual editor),
they are likely to do it repeatedly during a period of time.
In turn, their edits will be tagged with the same set of tags.
Instead of parsing the tags from scratch again and again,
memoize the result for use by subsequent calls.
Thanks to WikimediaDebug, I could reproduce a request to
Special:Contributions?limit=500 where 28% (1.6s) of request
time was spent in ChangeTags::formatSummaryRow. This change
should reduce it to less than 0.1s.
Change-Id: If81d7b5359f798f0b630ab1ad5b6282d0d9d9a55
|
|
|
|
| |
Change-Id: I3714e05b64d73a5cd87b3b052d8cb036cdc8ca64
|
|
|
|
|
|
|
| |
No longer used as of I7a31a07a8c3f1e265ac43ab59f23326590b407c3.
Bug: T263127
Change-Id: Ie58c0bb2ed8ff5b0fc6d4e42256010eb825fd9dd
|
|
|
|
|
| |
Bug: T330641
Change-Id: Ie1772da59f92213fea598f02385c3e0ac6d200a7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|
|
|
|
| |
Bug: T321882
Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The currently supported groups are documented in database.md.
While at it, prefer the string form of the $groups parameter where
possible, since the complexity of an array is never utilized, as the
groups either can't overlap, or are decided on by the caller instead.
This also helps with the simpler LBFactory::getConnection() proposed
in T326274.
Bug: T263127
Bug: T326274
Change-Id: I7a31a07a8c3f1e265ac43ab59f23326590b407c3
|
|
|
|
|
|
|
|
| |
Extensions implemented the onContribsPager__reallyDoQuery() hook can
use these new methods to limit the query range.
Bug: T167577
Change-Id: Ieda822f9ccffea179796f48929f02a75ee01fb95
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows up Ia03038e86c6a607c8b75eefedbf0285ca1a2f8c8.
* Only generate a rollback link for the latest revisions in
ContribsPager.
* Gate the entire ChangesList::insertPageTools beind the RC
attribs check, not just the rollback link generation.
* In ContribsPager::formatRow, check for the existence of $page in
a more reasonable place. This was already broken before Ia03038e
so I suspect $page is never null in practice (in theory, a
ContribsPager__reallyDoQuery hook handler could somehow produce
a $row with no title information), but it can't hurt.
* Add some documentation and FIXMEs.
* Remove a comment from ChangesList - part of it is not true
anymore after Ia03038e, part of it already didn't make sense
before that.
Bug: T51541
Bug: T325753
Change-Id: If848e38b568492579382a2c920cb865fb0326d99
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
No longer needed after injection of all services to the pagers
The non-internal getHookContainer function is now deprecated.
Change-Id: I2283c202aba669f42f6fa8c670142faf97c378af
|
|/
|
|
|
|
|
|
|
| |
This may seem a bit weird but anything else related to actor is already
under user/ including ActorCache, ActorNormalization, ActorStore and
ActorStoreFactory.
Bug: T321882
Change-Id: I7072b374bba7a0cd9d905e399c822bf30bd5c0d8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The history page renders an extensible list of tools for each
change list row. I've factored this code out so that it
can also be used on other pages that use the Pager class.
This generalizes the logic for the rollback link and makes sure
the control is standardized across pages. It also allows
the onHistoryTools hook run. I suggest we rename this to something
more generic in a follow up.
Right now usages of onHistoryTools are low but there should be
no issues with running it on more than the history page. One of
the benefits of this is the thanks link will now show on the
contributions page, watchlist and recent changes.
Bug: T51541
Change-Id: Ia03038e86c6a607c8b75eefedbf0285ca1a2f8c8
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a check box to Special:Contributions to expose the feature
to 'invert' the existing tag filter and passes this inversion through
as an exclusion to the back end, so that a tag can be excluded from
the results.
Bug: T119072
Bug: T174349
Change-Id: I34c864f25dfc199f6b32feb3025cb53e4ea050ce
|
|
|
|
|
|
|
| |
This feels like a no-brainer unless I'm missing something obvious
Bug: T321882
Change-Id: Id49c3d0dd6ea4593211048850856b5b8e05a8fb3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|/
|
|
|
|
|
|
| |
Available since PHP 7.4.
Automated search, manual replacement.
Change-Id: Ibb163141526e799bff08cfeb4037b52144bb39fa
|
|
|
|
|
|
|
|
| |
The alias temp_rev_user was used by RevisionStore::getQuryInfo
Bug: T215466
Follow-Up: I66b2cb8653252e720c897351065978119f040ba7
Change-Id: I4b4c2afbe942ad36fd96f3d9c604c836ffc6d8f7
|
|
|
|
|
|
|
| |
Change to use Authority object where possible
to use the interface instead of implementation
Change-Id: Ia7e9ce2a2f05ef2ae1cf981bf96faf48b04cf58d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
It is being dropped in production
Bug: T215466
Change-Id: I66b2cb8653252e720c897351065978119f040ba7
|
|/
|
|
|
| |
Bug: T308364
Change-Id: Ia0253e2553ff58c852f189e052344cf2f9fe1957
|
|
|
|
|
|
|
|
| |
We finished migration and now it should hint on the correct index on
revision table.
Bug: T307295
Change-Id: Ie2fa9f7be158b88cb8ea063735224de716852e52
|