return $this->mGoodTitles + $this->mMissingTitles;
}
- /**
- * Titles that were deemed invalid by Title::newFromText()
- * The array's index will be unique and negative for each item
- * @deprecated since 1.26, use self::getInvalidTitlesAndReasons()
- * @return string[] Array of strings (not Title objects)
- */
- public function getInvalidTitles() {
- wfDeprecated( __METHOD__, '1.26' );
- return array_map( function ( $t ) {
- return $t['title'];
- }, $this->mInvalidTitles );
- }
-
/**
* Titles that were deemed invalid by Title::newFromText()
* The array's index will be unique and negative for each item
private function processTitlesArray( $titles ) {
$usernames = [];
$linkBatch = new LinkBatch();
+ $services = MediaWikiServices::getInstance();
+ $contLang = $services->getContentLanguage();
foreach ( $titles as $title ) {
if ( is_string( $title ) ) {
$this->mInterwikiTitles[$unconvertedTitle] = $titleObj->getInterwiki();
} else {
// Variants checking
- $contLang = MediaWikiServices::getInstance()->getContentLanguage();
if (
$this->mConvertTitles && $contLang->hasVariants() && !$titleObj->exists()
) {
$this->mAllSpecials[$ns][$dbkey] = $this->mFakePageId;
$target = null;
if ( $ns === NS_SPECIAL && $this->mResolveRedirects ) {
- $spFactory = MediaWikiServices::getInstance()->getSpecialPageFactory();
+ $spFactory = $services->getSpecialPageFactory();
$special = $spFactory->getPage( $dbkey );
if ( $special instanceof RedirectSpecialArticle ) {
// Only RedirectSpecialArticle is intended to redirect to an article, other kinds of
}
}
// Get gender information
- $genderCache = MediaWikiServices::getInstance()->getGenderCache();
+ $genderCache = $services->getGenderCache();
$genderCache->doQuery( $usernames, __METHOD__ );
return $linkBatch;