Page MenuHomePhabricator

Add tag parameter to API action=rollback
Closed, ResolvedPublic

Description

For use by Huggle.

Event Timeline

TTO raised the priority of this task from to Low.
TTO updated the task description. (Show Details)
TTO added a project: MediaWiki-Change-tagging.
TTO moved this task from Backlog to Feature requests on the MediaWiki-Change-tagging board.
TTO added subscribers: Anomie, TTO, Petrb and 4 others.
Anomie set Security to None.
Anomie moved this task from Unsorted to Needs Code on the MediaWiki-Action-API board.

Right now it doesn't seem to be possible even to extensions. AbuseFilter seem to ignore rollbacks as well.

What is internal name for "Tags" in mediawiki code. I found parameter $flags in doEdit(), which is missing in doRollback() that might be that. If it's true, this parameter probably needs to be implemented there in first place, otherwise there is likely no way to perform a rollback with "Tags".

This comment was removed by Petrb.

It seems that tags are located in EditPage class, which is however completely bypassed by ApiRollback as it directly calls WikiPage->doRollback which doesn't seem to contain any parameter that could be used to pass the tags. So, the code of doRollback probably would need to modified so that it's possible to pass any tags to it.

Right now it doesn't seem to be possible even to extensions. AbuseFilter seem to ignore rollbacks as well.

It's possible for extensions, but AbuseFilter doesn't match rollbacks, see T24713.

I'll mentor this in #GCI2015. The mission here is basically to replicate what was done at https://gerrit.wikimedia.org/r/#/c/230526/6/includes/api/ApiDelete.php (up to line 105 on the right side of the diff), but for ApiRollback.php instead.

Change 259428 had a related patch set uploaded (by Mhutti1):
Add tag parameter to API action=rollback

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

Change 259428 merged by jenkins-bot:
Add tag parameter to API action=rollback

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

We'll run into the same issues as T100248, since the RC is deferred but not the addition of tags. I'll make a commit that fixes that.