$this->table = 'pagelinks';
$this->prefix = 'pl';
$this->titlesParam = 'titles';
- $this->helpUrl = 'https://www.mediawiki.org/wiki/API:Links';
+ $this->helpUrl = 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Links';
break;
case self::TEMPLATES:
$this->table = 'templatelinks';
$this->prefix = 'tl';
$this->titlesParam = 'templates';
- $this->helpUrl = 'https://www.mediawiki.org/wiki/API:Templates';
+ $this->helpUrl = 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Templates';
break;
default:
ApiBase::dieDebug( __METHOD__, 'Unknown module name' );
foreach ( $params[$this->titlesParam] as $t ) {
$title = Title::newFromText( $t );
if ( !$title ) {
- $this->setWarning( "\"$t\" is not a valid title" );
+ $this->addWarning( [ 'apiwarn-invalidtitle', wfEscapeWikiText( $t ) ] );
} else {
$lb->addObj( $title );
}
return [
'namespace' => [
ApiBase::PARAM_TYPE => 'namespace',
- ApiBase::PARAM_ISMULTI => true
+ ApiBase::PARAM_ISMULTI => true,
+ ApiBase::PARAM_EXTRA_NAMESPACES => [ NS_MEDIA, NS_SPECIAL ],
],
'limit' => [
ApiBase::PARAM_DFLT => 10,