diff --git a/src/Components/PageTools.php b/src/Components/PageTools.php index 8316b64c..f2b7c730 100644 --- a/src/Components/PageTools.php +++ b/src/Components/PageTools.php @@ -28,7 +28,6 @@ use Action; use MediaWiki\MediaWikiServices; -use MWNamespace; use Skins\Chameleon\ChameleonTemplate; use Skins\Chameleon\IdRegistry; @@ -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();