Use ExtensionRegistry rather than class_exists

Change-Id: I973768e0c1d87858f97ce3f1961850439672f638
This commit is contained in:
Reedy
2019-03-02 19:46:13 +00:00
parent 03bc19fab2
commit e1c7ad82bd

View File

@@ -69,7 +69,7 @@ class UniversalLanguageSelectorHooks {
if ( $wgULSCompactLanguageLinksBetaFeature === true && if ( $wgULSCompactLanguageLinksBetaFeature === true &&
$wgInterwikiMagic === true && $wgInterwikiMagic === true &&
$wgHideInterlanguageLinks === false && $wgHideInterlanguageLinks === false &&
class_exists( BetaFeatures::class ) && ExtensionRegistry::getInstance()->isLoaded( 'BetaFeatures' ) &&
BetaFeatures::isFeatureEnabled( $user, 'uls-compact-links' ) BetaFeatures::isFeatureEnabled( $user, 'uls-compact-links' )
) { ) {
// Compact language links is a beta feature in this wiki. Check the user's // Compact language links is a beta feature in this wiki. Check the user's