Allow prop=linkshere / transcludedin / fileusage to filter on given titles / templates / files
Open, Needs TriagePublic

Description

To avoid timeouts when getting all backlinks with prop=linkshere (see T139056) it should be possible for prop=linkshere to filter on given titles (similiar to prop=links&pltitles= or prop=categories&clcategories= ) to make looking for some backlinks easier.

Also for prop=transcludedin and prop=fileusage, because that is the same implementation.

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 30 2016, 5:13 PM
Anomie added a subscriber: Anomie.Jun 30 2016, 5:48 PM

I note that wouldn't actually prevent the timeouts in T139056.

Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Jun 30 2016, 5:50 PM

As far as actually writing code to do this if someone wants to, you'd want to take the supplied titles, turn them into page_ids, and use those page_ids with {$prefix}_from. And you'd probably want to forbid using both the "titles" parameter and the "namespace" parameter at the same time.