$title = $this->getTitle();
$ns = $title->getNamespace();
- $canonicalNamespace = MWNamespace::exists( $ns )
- ? MWNamespace::getCanonicalName( $ns )
+ $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
+ $canonicalNamespace = $nsInfo->exists( $ns )
+ ? $nsInfo->getCanonicalName( $ns )
: $title->getNsText();
$sk = $this->getSkin();