Page MenuHomePhabricator

Allow ContributionsPager to fetch and show revisions from the `revision` or `archive` table
Closed, ResolvedPublic

Description

Background

We want to do this as part of work to implement Special:IPContributions (in the CheckUser extension), which shows contributions from temporary accounts editing from the same IP address or range. (See T358852: [Epic] Display temporary account contributions on Special:Contributions for IP addresses and IP ranges for full context.)

SpecialIPContributions needs to be able to show existing contributions (from the revision table) or deleted contributions (from the archive table).

SpecialIPContributions uses IPContributionsPager, which extends ContributionsPager, from MediaWiki core. ContributionsPager does most of the work to filter and display the relevant revisions. Most of the functionality provided by ContributionsPager would be useful for deleted (archived) contributions too.

(Eventually, it may be possible to make DeletedContribsPager extend ContributionsPager. That is beyond the scope of this current work.)

What needs doing

By making a few field names configurable, and by ensuring we fetch the revisions from the correct table, ContributionsPager can handle both deleted contributions and normal contributions.

Event Timeline

Change #1038402 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/core@master] WIP Allow ContributionsPager to show revisions from the archive table

https://gerrit.wikimedia.org/r/1038402

Test wiki created on Patch demo by Tchanders using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/aa74df7536/w

Testing notes

We just need to test Special:Contributions for regressions - there should be no changes. In particular:

  • check that the search form filters still work
  • check that the rows look the same

This patch also introduces new functionality for T363362: Show temporary account deleted contributions from a given IP address on Special:IPContributions, which will be tested as part of that task.

Change #1038402 merged by jenkins-bot:

[mediawiki/core@master] Allow ContributionsPager to show revisions from the archive table

https://gerrit.wikimedia.org/r/1038402

dom_walden subscribed.

Testing notes

We just need to test Special:Contributions for regressions - there should be no changes. In particular:

  • check that the search form filters still work
  • check that the rows look the same

Thanks. I can confirm this when comparing the latest (8276047) and previous (ae155e7) versions.

Test environment: local docker