Skip to content

Commit

Permalink
Remove deprecated MWNamespace
Browse files Browse the repository at this point in the history
  • Loading branch information
malberts committed Mar 29, 2022
1 parent 5961012 commit 1790f7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Components/PageTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

use Action;
use MediaWiki\MediaWikiServices;
use MWNamespace;
use Skins\Chameleon\ChameleonTemplate;
use Skins\Chameleon\IdRegistry;

Expand Down Expand Up @@ -196,7 +195,9 @@ public function getNamespaceKey() {
// Gets the subject namespace of this title
$title = $this->getSkinTemplate()->getSkin()->getTitle();

$namespaceKey = MWNamespace::getCanonicalName( $title->getNamespace() );
$namespaceKey = MediaWikiServices::getInstance()->getNamespaceInfo()->getCanonicalName(
$title->getNamespace()
);

if ( $namespaceKey === false ) {
$namespaceKey = $title->getNsText();
Expand Down

0 comments on commit 1790f7e

Please sign in to comment.