return;
}
- global $wgContLang;
-
$colours = [];
$linkCache = MediaWikiServices::getInstance()->getLinkCache();
$output = $this->parent->getOutput();
}
# Do a second query for different language variants of links and categories
- if ( $wgContLang->hasVariants() ) {
+ if ( $this->parent->getContentLanguage()->hasVariants() ) {
$this->doVariants( $colours );
}
* @param array &$colours
*/
protected function doVariants( &$colours ) {
- global $wgContLang;
$linkBatch = new LinkBatch();
$variantMap = []; // maps $pdbkey_Variant => $keys (of link holders)
$output = $this->parent->getOutput();
}
// Now do the conversion and explode string to text of titles
- $titlesAllVariants = $wgContLang->autoConvertToAllVariants( rtrim( $titlesToBeConverted, "\0" ) );
+ $titlesAllVariants = $this->parent->getContentLanguage()->
+ autoConvertToAllVariants( rtrim( $titlesToBeConverted, "\0" ) );
$allVariantsName = array_keys( $titlesAllVariants );
foreach ( $titlesAllVariants as &$titlesVariant ) {
$titlesVariant = explode( "\0", $titlesVariant );
foreach ( $output->getCategoryLinks() as $category ) {
$categoryTitle = Title::makeTitleSafe( NS_CATEGORY, $category );
$linkBatch->addObj( $categoryTitle );
- $variants = $wgContLang->autoConvertToAllVariants( $category );
+ $variants = $this->parent->getContentLanguage()->autoConvertToAllVariants( $category );
foreach ( $variants as $variant ) {
if ( $variant !== $category ) {
$variantTitle = Title::makeTitleSafe( NS_CATEGORY, $variant );