Add the resolved URL of each langlink to the API's action=parse output

This commit is contained in:
Roan Kattouw 2011-01-28 01:09:47 +00:00
parent 5d6957894e
commit 809ab03c48

View file

@ -324,7 +324,12 @@ class ApiParse extends ApiBase {
foreach ( $links as $link ) {
$entry = array();
$bits = explode( ':', $link, 2 );
$title = Title::newFromText( $link );
$entry['lang'] = $bits[0];
if ( $title ) {
$entry['url'] = $title->getFullURL();
}
$this->getResult()->setContent( $entry, $bits[1] );
$result[] = $entry;
}