Page MenuHomePhabricator

Allow namespace filter for list=deletedrevs&druser
Closed, ResolvedPublic

Description

Special:DeletedContributions has a namespace filter, but the corresponding api module support the namespace param only for "deleted revisions in the given namespace".

Please allow the namespace filter also work for "deleted contributions for the given user".

Thanks.


Version: 1.18.x
Severity: enhancement

Details

Reference
bz27193

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:15 PM
bzimport set Reference to bz27193.
bzimport added a subscriber: Unknown Object (MLST).

This seems to be disabled purposely due to the way that the sorts and such are added on by the API, a sane query can be built (ie no filesort)

It's providing a lot more functionality than DeletedContributions does to begin with

We probably need to create a "mode 4"

CREATE INDEX /*i*/name_title_timestamp ON /*_*/archive (ar_namespace,ar_title,ar_timestamp);
CREATE INDEX /*i*/ar_usertext_timestamp ON /*_*/archive (ar_user_text,ar_timestamp);
CREATE INDEX /*i*/ar_revid ON /*_*/archive (ar_rev_id);

  1. List deleted revisions for the given title(s), sorted by timestamp
  2. List deleted contributions for the given user, sorted by timestamp (no titles specified)
  3. List all deleted revisions in the given namespace, sorted by title and timestamp (no titles specified, druser not set)

List deleted contributions for the given user, in the given namespace, sorted by timestamp

SELECT /* IndexPager::reallyDoQuery (DeletedContribsPager) Reedy */ ar_rev_id,ar_namespace,ar_title,ar_timestamp,ar_comment,ar_minor_edit,ar_user,ar_user_text,ar_deleted FROM mw_archive FORCE INDEX (usertext_timestamp) WHERE ar_user_text = 'Reedy' AND ar_namespace = '0' AND ((ar_deleted & 12) != 12) ORDER BY ar_timestamp DESC LIMIT 51

Starting to do this, then hit a snag. By default NS is set to 0... So we can't just do a NS/User filter, and know whether we want to hit 2 or 4..

So people could then unknowingly be filtering by NS 0, which they may or may not want...

Change 168646 had a related patch set uploaded by Anomie:
API: Split list=deletedrevs into prop=deletedrevisions and list=alldeletedrevisions

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

Change 168646 merged by jenkins-bot:
API: Split list=deletedrevs into prop=deletedrevisions and list=alldeletedrevisions

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