Add the resolved URL of each langlink to the API's action=parse output
This commit is contained in:
parent
5d6957894e
commit
809ab03c48
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue