* (bug 28002) Internal error in ApiFormatRaw::getMimeType
* (bug 26597) Allow toggling of persistent cookies ("remember me") in API
action=login
+* (bug 29237) add interwiki target url attribute to api/query/interwiki
=== Languages updated in 1.19 ===
*/
private $mPageSet;
- private $params, $redirects, $convertTitles;
+ private $params, $redirects, $convertTitles, $iwUrl;
private $mQueryPropModules = array(
'info' => 'ApiQueryInfo',
$this->params = $this->extractRequestParams();
$this->redirects = $this->params['redirects'];
$this->convertTitles = $this->params['converttitles'];
+ $this->iwUrl = $this->params['wurl'];
// Create PageSet
$this->mPageSet = new ApiPageSet( $this, $this->redirects, $this->convertTitles );
// Interwiki titles
$intrwValues = array();
foreach ( $pageSet->getInterwikiTitles() as $rawTitleStr => $interwikiStr ) {
- $intrwValues[] = array(
+ $item = array(
'title' => $rawTitleStr,
- 'iw' => $interwikiStr
+ 'iw' => $interwikiStr,
);
+ if ( $this->iwUrl ) {
+ $title = Title::newFromText( "{$interwikiStr}:{$rawTitleStr}" );
+ $item['url'] = $title->getFullURL();
+ }
+ $intrwValues[] = $item;
}
if ( count( $intrwValues ) ) {
'indexpageids' => false,
'export' => false,
'exportnowrap' => false,
+ 'iwurl' => false,
);
}
'indexpageids' => 'Include an additional pageids section listing all returned page IDs',
'export' => 'Export the current revisions of all given or generated pages',
'exportnowrap' => 'Return the export XML without wrapping it in an XML result (same format as Special:Export). Can only be used with export',
+ 'iwurl' => 'Whether to get the full URL if the title is an interwiki link',
);
}