X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryLinks.php;h=4556e29062b87934e024f13b51063bdca80e900e;hb=524b25dc301baee0b49fd04f355aa78c7040925d;hp=6e5239f7b9324d5a6bbb037dae7ae2dd52b07a8c;hpb=f9d7d3b8561dab3ddfd8798a77a5b72e03ac8c2b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryLinks.php b/includes/api/ApiQueryLinks.php index 6e5239f7b9..4556e29062 100644 --- a/includes/api/ApiQueryLinks.php +++ b/includes/api/ApiQueryLinks.php @@ -94,7 +94,7 @@ class ApiQueryLinks extends ApiQueryGeneratorBase { 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 ); } @@ -182,7 +182,8 @@ class ApiQueryLinks extends ApiQueryGeneratorBase { 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,