Geoclient fixes for https and WMF
* Don't call freegeoip on https, it wont work * Use Geo instead of GEO like WMF Change-Id: I9ebdd9f3518e15e70122a9c8c8d64240d5e44c5b
This commit is contained in:
committed by
Gerrit Code Review
parent
8d5307852a
commit
3c9e7249a8
@@ -63,7 +63,8 @@
|
||||
};
|
||||
|
||||
mw.uls.getFrequentLanguageList = function () {
|
||||
var unique = [],
|
||||
var countryCode,
|
||||
unique = [],
|
||||
list = [
|
||||
mw.config.get( 'wgUserLanguage' ),
|
||||
mw.config.get( 'wgContentLanguage' ),
|
||||
@@ -72,8 +73,9 @@
|
||||
.concat( mw.uls.getPreviousLanguages() )
|
||||
.concat( mw.uls.getAcceptLanguageList() );
|
||||
|
||||
if ( window.GEO ) {
|
||||
list = list.concat( $.uls.data.getLanguagesInTerritory( mw.uls.getCountryCode() ) );
|
||||
countryCode = mw.uls.getCountryCode()
|
||||
if ( countryCode ) {
|
||||
list = list.concat( $.uls.data.getLanguagesInTerritory( countryCode ) );
|
||||
}
|
||||
|
||||
$.each( list, function ( i, v ) {
|
||||
|
||||
Reference in New Issue
Block a user