Add separate log action for file reverts
authorMGChecker <hgasuser@gmail.com>
Mon, 1 Oct 2018 18:05:44 +0000 (20:05 +0200)
committerBrian Wolff <bawolff+wn@gmail.com>
Sat, 2 Mar 2019 22:16:55 +0000 (22:16 +0000)
commit84c46d38b7385c97fc3c1e865e3d7ba29f07520f
treee6ba86907e8c970ec59c0bd61a8bfc5b68056390
parent37f9a4e277ec1e1e7c50d0bb751d17c01001180e
Add separate log action for file reverts

This change s adds 'revert' as a separate log action for file reverts, as it
allows special formatting of log entries and revisions in UI and filtering
for file reverts specifically.

Even though there are no log entries with this log action right now, it does
seem that this was intended as some point, as there are corresponding
test cases in UploadLogFormatterTest, and is listed in
$wgLogActionsHandlers and https://www.mediawiki.org/wiki/API:Logevents
as well. Furthermore, the i18n message 'logentry-upload-revert' already
existed before this change.

Because this functionality can not be provided by tags, the 'mw-undo' tag
is not suited for this use case. However, it could be added additionally to
all log entries with this log action..

Bug: T60209
Change-Id: Ie1ccd8053dc5de58b2297a8460219f0233aab968
includes/DefaultSettings.php
includes/actions/RevertAction.php
includes/filerepo/file/LocalFile.php
includes/logging/LogFormatter.php
languages/i18n/en.json
languages/i18n/qqq.json
tests/phpunit/includes/logging/UploadLogFormatterTest.php