);
$linkRenderer = $this->getLinkRenderer();
ksort( $namespaceProtection );
+ $validNamespaces = MWNamespace::getValidNamespaces();
+ $contLang = MediaWikiServices::getInstance()->getContentLanguage();
foreach ( $namespaceProtection as $namespace => $rights ) {
- if ( !in_array( $namespace, MWNamespace::getValidNamespaces() ) ) {
+ if ( !in_array( $namespace, $validNamespaces ) ) {
continue;
}
if ( $namespace == NS_MAIN ) {
$namespaceText = $this->msg( 'blanknamespace' )->text();
} else {
- $namespaceText = MediaWikiServices::getInstance()->getContentLanguage()->
- convertNamespace( $namespace );
+ $namespaceText = $contLang->convertNamespace( $namespace );
}
$out->addHTML(