Use LanguageNameUtils::AUTONYMS/SUPPORTED instead of hard coded value

Easier to spot the documentation what happen with this option

Change-Id: I977485c2cba0063b5bdee3724d9262b75341faec
This commit is contained in:
Umherirrender
2022-12-29 13:41:24 +01:00
parent cdad935e4c
commit 61256e25b7
2 changed files with 4 additions and 2 deletions

View File

@@ -270,7 +270,8 @@ class Hooks implements
* @return string
*/
protected function getDefaultLanguage( array $preferred ) {
$supported = $this->languageNameUtils->getLanguageNames( LanguageNameUtils::AUTONYMS, 'mwfile' );
$supported = $this->languageNameUtils
->getLanguageNames( LanguageNameUtils::AUTONYMS, LanguageNameUtils::SUPPORTED );
// look for a language that is acceptable to the client
// and known to the wiki.