Last modified: 2007-06-14 14:00:03 UTC
Would it be possible to retrieve the InterWiki table through a request like this?
This shouldn't be hard to implement, simply retrieve the table from the DB as an array and spit it out.
Thanks in advance.
Created attachment 3758 [details]
I've attached a patch (see attachment) that implements:
* list=interwiki (iw) *
List interwiki bindings.
iwcontinue - Fill in the value returned by an earlier query to continue that query
iwlimit - The maximum number of bindings to list.
iwfilter - Filter to apply
"local": Only list local interwiki bindings
"nonlocal": Only list nonlocal interwiki bindings
"all": List all interwiki bindings
One value: local, nonlocal, all
Apply this patch from the MediaWiki root with patch -p1
Hmm,apparently attaching this comment to the attachment would've been better... well, I'm new to BugZilla ^^
I kept the original siteinfo - I don't think we should introduce an extra module for something like this. Also, no point in doing limits - the table wouldn't be that long (I wouldn't think) not to return it whole.
Fixed in r22975
(In reply to comment #3)
> I kept the original siteinfo - I don't think we should introduce an extra
> module for something like this. Also, no point in doing limits - the table
> wouldn't be that long (I wouldn't think) not to return it whole.
> Fixed in r22975
Thanks. However, the returned array uses number as keys rather than
prefixes, which I initially implemented. Now that might not make much
sense in XML format, but it does make sense in (say) PHP serialized
format, as it makes it easier to retrieve information about a known
interwiki prefix. Is there a way that we can make something that looks
like this in XML:
<iw prefix="fr" url="http://fr.wikipedia.org/wiki/$1" local="">
But looks like this:
['query'] => Array(
['interwiki'] => Array(
['fr'] => Array(
['prefix'] => fr
['url'] => http://fr.wikipedia.org/wiki/$1
Is this possible with setIndexedTagName? Thanks in advance,