LanguageNameIndexer: Stop writing to a global

It has no effect anymore. I could not find easy way to achieve what
it is trying to do, so just making the script exit with an error if
custom languages are present.

Change-Id: I693503b4ec46e6ac3eb4a11f4ce065f960f2ec62
This commit is contained in:
Niklas Laxström
2023-10-25 17:32:28 +03:00
committed by jenkins-bot
parent 6d22f7d23e
commit 5a23ea4635

View File

@@ -39,7 +39,9 @@ class LanguageNameIndexer extends Maintenance {
global $wgExtraLanguageNames;
// Avoid local configuration leaking to this script
$wgExtraLanguageNames = [];
if ( $wgExtraLanguageNames !== [] ) {
$this->fatalError( 'You have entries in $wgExtraLanguageNames. Needs to be empty for this script.' );
}
$languageNames = [];
// Add languages from language-data