Skip to content

Commit

Permalink
Replace LinkCache::singleton that was removed in MW 1.38
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikerabbit authored Dec 28, 2023
1 parent 526bfd9 commit 7f31f29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PageContentLanguageDbModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use LinkCache;
use Title;
use DatabaseBase;
use MediaWiki\MediaWikiServices;

/**
* Handling Title::getDbPageLanguageCode and Special:PageLanguage to avoid possible
Expand Down Expand Up @@ -93,7 +94,7 @@ public function updatePageLanguage( $expectedLanguageCode ) {
private function getDbPageLanguageCode() {

if ( $this->linkCache === null ) {
$this->linkCache = LinkCache::singleton();
$this->linkCache = MediaWikiServices::getInstance()->getLinkCache();
}

// check, if the page language could be saved in the database, and if so and
Expand Down

0 comments on commit 7f31f29

Please sign in to comment.