X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialListgrouprights.php;h=1d10791363f0b991e3327f911f1a80dcec3ee475;hp=6091a641d0e9b5026118579cc616c7bd649bee31;hb=4cebf80a894f1bc9f9e2f732c8b78d5237810343;hpb=925c20a9ca669c67cc44f4468d0e0f3b33b94213 diff --git a/includes/specials/SpecialListgrouprights.php b/includes/specials/SpecialListgrouprights.php index 6091a641d0..1d10791363 100644 --- a/includes/specials/SpecialListgrouprights.php +++ b/includes/specials/SpecialListgrouprights.php @@ -21,6 +21,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * This special page lists all defined user groups and the associated rights. * See also @ref $wgGroupPermissions. @@ -133,7 +135,6 @@ class SpecialListGroupRights extends SpecialPage { } private function outputNamespaceProtectionInfo() { - global $wgContLang; $out = $this->getOutput(); $namespaceProtection = $this->getConfig()->get( 'NamespaceProtection' ); @@ -161,15 +162,17 @@ class SpecialListGroupRights extends SpecialPage { ); $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 = $wgContLang->convertNamespace( $namespace ); + $namespaceText = $contLang->convertNamespace( $namespace ); } $out->addHTML(