Page MenuHomePhabricator

Annotate redirects from prop=info if target is an interwiki
Closed, ResolvedPublic

Description

Take for example: https://en.wikipedia.org/w/api.php?format=xml&action=query&converttitles=&prop=info%7crevisions&intoken=edit&titles=User%3aReedy%2fRIW&inprop=protection%7cwatched%7cdisplaytitle&rvprop=content%7ctimestamp&redirects=&assert=user&meta=userinfo|notifications&uiprop=hasmsg&notprop=count

<query>
<redirects>
<r from="User:Reedy/RIW" to="de:User:Reedy"/>
</redirects>
<userinfo id="449918" name="Reedy"/>
<notifications rawcount="0" count="0"/>
</query>

It'd be really useful if the API could annotate if the target is an interwiki. There is nothing better than the local MW install at knowing what is a redirect on itself. Or, than being some extra attribute (like interwiki="true" or whatever), if we could extract and list the interwikis... Like we do elsewhere if we're given an interwiki title to open etc

https://en.wikipedia.org/w/api.php?format=xml&action=query&converttitles=&prop=info%7crevisions&intoken=edit&titles=De%3aFoobar&inprop=protection%7cwatched%7cdisplaytitle&rvprop=content%7ctimestamp&redirects=&assert=user&meta=userinfo|notifications&uiprop=hasmsg&notprop=count

<query>
<normalized>
<n from="De:Foobar" to="de:Foobar"/>
</normalized>
<interwiki>
<i title="de:Foobar" iw="de"/>
</interwiki>
<userinfo id="449918" name="Reedy"/>
<notifications rawcount="0" count="0"/>
</query>

Details

Related Gerrit Patches:

Event Timeline

Reedy created this task.Dec 28 2014, 6:28 PM
Reedy raised the priority of this task from to Needs Triage.
Reedy updated the task description. (Show Details)
Reedy added a project: MediaWiki-API.
Reedy added a subscriber: Reedy.
Reedy set Security to None.Dec 28 2014, 8:42 PM
Reedy added a subscriber: Anomie.
Aklapper triaged this task as Low priority.Dec 28 2014, 10:59 PM
Anomie claimed this task.Dec 29 2014, 5:54 PM
Anomie added a project: MediaWiki-Core-Team.

Change 182081 had a related patch set uploaded (by Anomie):
API: Improve handling of interwiki redirects when resolving

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

Patch-For-Review

Change 182081 merged by jenkins-bot:
API: Improve handling of interwiki redirects when resolving

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

Umherirrender closed this task as Resolved.Jan 7 2015, 9:12 PM
Umherirrender added a subscriber: Umherirrender.
bd808 moved this task from Done to Archive on the MediaWiki-Core-Team board.Jan 12 2015, 11:37 PM

@Magioladitis: Can you file that separate bug as a new task here in Phabricator?

RandomDSdevel added a comment.EditedMar 26 2015, 3:09 PM

Thanks! That'll help the devs a ton.

Josve05a moved this task from Backlog to Closed on the AutoWikiBrowser board.Apr 6 2015, 1:29 AM