'code' => 'bl',
'prefix' => 'pl',
'linktbl' => 'pagelinks',
- 'helpurl' => 'https://www.mediawiki.org/wiki/API:Backlinks',
+ 'helpurl' => 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Backlinks',
],
'embeddedin' => [
'code' => 'ei',
'prefix' => 'tl',
'linktbl' => 'templatelinks',
- 'helpurl' => 'https://www.mediawiki.org/wiki/API:Embeddedin',
+ 'helpurl' => 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Embeddedin',
],
'imageusage' => [
'code' => 'iu',
'prefix' => 'il',
'linktbl' => 'imagelinks',
- 'helpurl' => 'https://www.mediawiki.org/wiki/API:Imageusage',
+ 'helpurl' => 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Imageusage',
]
];
if ( $this->params['filterredir'] == 'redirects' ) {
$this->addWhereFld( 'page_is_redirect', 1 );
} elseif ( $this->params['filterredir'] == 'nonredirects' && !$this->redirect ) {
- // bug 22245 - Check for !redirect, as filtering nonredirects, when
+ // T24245 - Check for !redirect, as filtering nonredirects, when
// getting what links to them is contradictory
$this->addWhereFld( 'page_is_redirect', 0 );
}
// Note we must keep the parameters for the first query constant
// This may be overridden at a later step
$title = $row->{$this->bl_title};
- $this->continueStr = join( '|', array_slice( $this->cont, 0, 2 ) ) .
+ $this->continueStr = implode( '|', array_slice( $this->cont, 0, 2 ) ) .
"|$ns|$title|{$row->from_ns}|{$row->page_id}";
break;
}
$this->validateLimit( 'limit', $this->params['limit'], 1, $userMax, $botMax );
}
- $this->rootTitle = $this->getTitleOrPageId( $this->params )->getTitle();
+ $this->rootTitle = $this->getTitleFromTitleOrPageId( $this->params );
// only image titles are allowed for the root in imageinfo mode
if ( !$this->hasNS && $this->rootTitle->getNamespace() !== NS_FILE ) {
- $this->dieUsage(
- "The title for {$this->getModuleName()} query must be a file",
+ $this->dieWithError(
+ [ 'apierror-imageusage-badtitle', $this->getModuleName() ],
'bad_image_title'
);
}
[ 'query', $this->getModuleName() ],
$idx, array_diff_key( $arr, [ 'redirlinks' => '' ] ) );
if ( !$fit ) {
- $this->continueStr = join( '|', array_slice( $this->cont, 0, 6 ) ) .
+ $this->continueStr = implode( '|', array_slice( $this->cont, 0, 6 ) ) .
"|$pageID";
break;
}
[ 'query', $this->getModuleName(), $idx, 'redirlinks' ],
null, $redir );
if ( !$fit ) {
- $this->continueStr = join( '|', array_slice( $this->cont, 0, 6 ) ) .
+ $this->continueStr = implode( '|', array_slice( $this->cont, 0, 6 ) ) .
"|$pageID|$key";
break;
}