From: Fomafix Date: Thu, 9 Mar 2017 07:33:10 +0000 (+0100) Subject: Replace deprecated $wgDummyLanguageCodes in WebInstallerLanguage.php X-Git-Tag: 1.31.0-rc.0~2974^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=c28563471f560308a956463ec0a8fa3a3d1835f1;p=lhc%2Fweb%2Fwiklou.git Replace deprecated $wgDummyLanguageCodes in WebInstallerLanguage.php The internal language codes of the reserved for local use area 'qqq' and 'qqx' are not in Language::fetchLanguageNames(). The check for deprecated language codes can removed, when they are removed from Language::fetchLanguageNames(). Change-Id: I5d67ac3f9fbf341ee6bd84094fb671e97e512dd4 --- diff --git a/includes/installer/WebInstallerLanguage.php b/includes/installer/WebInstallerLanguage.php index cfd4a862c2..bce07d3118 100644 --- a/includes/installer/WebInstallerLanguage.php +++ b/includes/installer/WebInstallerLanguage.php @@ -98,17 +98,19 @@ class WebInstallerLanguage extends WebInstallerPage { * @return string */ public function getLanguageSelector( $name, $label, $selectedCode, $helpHtml = '' ) { - global $wgDummyLanguageCodes; + global $wgExtraLanguageCodes; $output = $helpHtml; $select = new XmlSelect( $name, $name, $selectedCode ); $select->setAttribute( 'tabindex', $this->parent->nextTabIndex() ); + $unwantedLanguageCodes = $wgExtraLanguageCodes + + LanguageCode::getDeprecatedCodeMapping(); $languages = Language::fetchLanguageNames(); ksort( $languages ); foreach ( $languages as $code => $lang ) { - if ( isset( $wgDummyLanguageCodes[$code] ) ) { + if ( isset( $unwantedLanguageCodes[$code] ) ) { continue; } $select->addOption( "$code - $lang", $code );