Use ExtensionRegistry to see if Babel is loaded

Change-Id: Iabc24b4580bab39a6d232d61e9c52a641cce41a3
This commit is contained in:
Reedy
2022-03-06 14:41:10 +00:00
parent a07c5ea263
commit 430afafeb7

View File

@@ -422,7 +422,7 @@ class Hooks implements
$vars['wgULSAcceptLanguageList'] = array_keys( $out->getRequest()->getAcceptLang() );
}
if ( $loggedIn && class_exists( Babel::class ) ) {
if ( $loggedIn && ExtensionRegistry::getInstance()->isLoaded( 'Babel' ) ) {
$userLanguageInfo = Babel::getCachedUserLanguageInfo( $user );
// This relies on the fact that Babel levels are 'N' and