Remove the dependency on uls.data

Change-Id: I9fa103ee7d338ed8ea2032c82249a47d022d2c90
This commit is contained in:
Amir E. Aharoni
2013-11-06 12:55:09 +02:00
committed by Amire80
parent f5ce066c80
commit b23f937cb7
4 changed files with 30 additions and 7 deletions

View File

@@ -271,6 +271,10 @@ class UniversalLanguageSelectorHooks {
$vars['wgULSNoImeSelectors'] = $wgULSNoImeSelectors;
$vars['wgULSNoWebfontsSelectors'] = $wgULSNoWebfontsSelectors;
// An optimization to avoid loading all of uls.data just to get the autonym
$lang = RequestContext::getMain()->getLanguage();
$vars['wgULSCurrentAutonym'] = $lang->fetchLanguageName( $lang->getCode() );
if ( is_string( $wgULSFontRepositoryBasePath ) ) {
$vars['wgULSFontRepositoryBasePath'] = $wgULSFontRepositoryBasePath;
} else {