Page MenuHomePhabricator

Add hooks to make it possible for an extension to add more flags to changes lists, diffs, history printouts, etc.
Open, LowPublic

Description

MirrorTools needs to add flags to show which revisions originated on the local wiki and which originated on a remote wiki. Functions that might need hooks added:
*EnhancedChangesList::recentChangesBlockGroup()
*OldChangesList::recentChangesLine()
*HistoryPager::historyLine()
*DifferenceEngine::showDiffPage()

...among others. Maybe alternatively, we can fix bug T59490 and come up with a solution that involves listing the origin wiki of revisions (rather than just displaying a one-letter flag, e.g. "W" for Wikimedia, etc.)

Details

Reference
bz69677

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:39 AM
bzimport set Reference to bz69677.

Change 155093 had a related patch set uploaded by leucosticte:
Add seven hooks to enable more flags to be added to changes lists, etc.

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

Here's are a couple screenshots of what RecentChanges looks like when this patch is applied:
*Enhanced (i.e. Javascript) recent changes feed: https://upload.wikimedia.org/wikipedia/mediawiki/d/dc/EnhancedRecentChangesWithW.png
*Unenhanced recent changes feed: https://upload.wikimedia.org/wikipedia/mediawiki/7/77/RecentChangesWithW.png

The two screenshots depict an identical state of affairs databasewise, except that the first one is with the enhanced recent changes option enabled. In this example, page Foo has been edited twice and then moved to Foobar on RemoteWiki (in deployment, this would be "Wikipedia"); then page Foobar has been edited once on LocalWiki (in deployment, this would be "Inclupedia").

In the enhanced recent changes feed, the page move line has a "W" indicating that the event was mirrored from the remote wiki. There is no W on that line in the unenhanced recent changes feed, although there should be. The question is, where to put it? Currently, it reads:

(Move log); 20:31 . . Nate (Talk | contribs | block) moved page Foo to Foobar ‎

Should the W be put at the very beginning; before the timestamp; after the timestamp; or somewhere else?

To clarify, these are screenshots from LocalWiki after the mirroring operation has been done.

abd wrote:

After the timestamp, quite as you did, and with an additional identifier as you used, the exclamation point. It is, effectively, part of the page name. But not.

The other possible place is before the user name. I.e., this is a change by a W user, on W.

I'm thinking of all the times I needed to parse history displays and an extra field is a nuisance....

(In reply to Abd ulRahman Lomax from comment #4)

I'm thinking of all the times I needed to parse history displays and an
extra field is a nuisance....

How so?

TTO set Security to None.