Use interwiki cache directly to resolve transwiki import sources
authorThis, that and the other <at.light@live.com.au>
Wed, 4 Nov 2015 23:42:14 +0000 (10:42 +1100)
committerThis, that and the other <at.light@live.com.au>
Wed, 4 Nov 2015 23:42:14 +0000 (10:42 +1100)
commite63129e8828528ae78f1a87293fdf08229c6c2e2
tree2d63a178b59890c46413b62052870e2153c92a3d
parentf17ae78218685ee55b0a599b1b65932f2a5ca99a
Use interwiki cache directly to resolve transwiki import sources

In order to resolve T17583, we will need to have a WMF-wide map of import
sources. This will most likely consist of a project dropdown, e.g.
"wikipedia", "wiktionary", "meta"... and a subproject dropdown, listing
each language edition of the selected project.

This would mean, if we wanted to import a page from French Wikipedia to
English Wikipedia, we would need to select project "wikipedia" and language
"fr". Currently, this causes the error "Bad interwiki link", because the
prefix "wikipedia:" maps to the local project namespace on enwiki, instead
of the relevant interwiki prefix.

To avoid this error we need to bypass Title and directly query the
interwiki map.

Change-Id: I68989203e367e7ea515e4ae2222c330b264a7cb1
includes/Import.php