Tgr added a comment.

In https://phabricator.wikimedia.org/T85153#963274, @XZise wrote:

> Okay but for each repo which uses normal pages, doesn't the server need to 
> know how to get to the file (aka `//commons.wikimedia.org/wiki/File:$1`)? So 
> at least all repo classes which can do that should be able to use the the 
> same property which can be retrieved via json.


For local repos, you can use `articlepath` from the siteinfo API. For API-based 
foreign repos, `articlepath` and `server`is included in the filerepoinfo API 
output. For shared-DB foreign repos, you can use `descBaseUrl`.

See 
http://en.wikipedia.beta.wmflabs.org/w/api.php?action=query&meta=filerepoinfo 
for an example which has all three kinds of repos and uses code from master.

It would be nicer to have a property which has the same name and semantics for 
all three, not sure if that's important enough to create duplicate properties 
though.


TASK DETAIL
  https://phabricator.wikimedia.org/T85153

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Tgr
Cc: Aklapper, XZise, Anomie, jayvdb, Tgr, Fabrice_Florin, Gilles, Legoktm, 
pywikipedia-bugs



_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs

Reply via email to