Drop support for discontinued freegeoip.net

There is a new service called ipstack, but their free option does
not support https, so by default there will not be any geoip service.

Bug: T199106
Change-Id: I9f4e59d736b50760f50c6214e2d191e72406d0d9
This commit is contained in:
Niklas Laxström
2018-09-07 09:10:43 +02:00
committed by Krinkle
parent 4e067715dc
commit 1857627c2f
2 changed files with 4 additions and 7 deletions

View File

@@ -125,7 +125,7 @@ class UniversalLanguageSelectorHooks {
$out->addModules( 'ext.uls.compactlinks' ); $out->addModules( 'ext.uls.compactlinks' );
} }
if ( $wgULSGeoService ) { if ( is_string( $wgULSGeoService ) ) {
$out->addModules( 'ext.uls.geoclient' ); $out->addModules( 'ext.uls.geoclient' );
} }
@@ -309,10 +309,7 @@ class UniversalLanguageSelectorHooks {
// Place constant stuff here (not depending on request context) // Place constant stuff here (not depending on request context)
if ( $wgULSGeoService === true ) { if ( is_string( $wgULSGeoService ) ) {
$wgULSGeoService = 'https://freegeoip.net/json/?callback=?';
}
if ( $wgULSGeoService ) {
$vars['wgULSGeoService'] = $wgULSGeoService; $vars['wgULSGeoService'] = $wgULSGeoService;
} }

View File

@@ -59,8 +59,8 @@
"compact-language-links": true "compact-language-links": true
}, },
"config": { "config": {
"@ULSGeoService": "ULS can use a geolocation service to suggest languages based on the country the user is vising from. If set to true, it will query a free geoip service. Setting this to false will prevent built-in geolocation from being used. You can provide your own geolocation by setting window.Geo to an object which has key \"country_code\" or \"country\".", "@ULSGeoService": "ULS can use a geolocation service to suggest languages based on the country the user is vising from. If set to an URL it will query that service which must return an object which has key \"country_code\" or \"country\". For example https://api.ipstack.com/check?access_key=yourkey&fields=country_code. Setting this to false will prevent built-in geolocation from being used. You can also provide your own geolocation by assigning such object to window.Geo.",
"ULSGeoService": true, "ULSGeoService": false,
"@ULSEnable": "Enable language selection, compact language links, input methods and webfonts for everyone, unless the behavior is overridden by the configuration variables below. Even if false the classes and resource loader modules are registered for the use of other extensions. Language changing via cookie or setlang query parameter is not possible.", "@ULSEnable": "Enable language selection, compact language links, input methods and webfonts for everyone, unless the behavior is overridden by the configuration variables below. Even if false the classes and resource loader modules are registered for the use of other extensions. Language changing via cookie or setlang query parameter is not possible.",
"ULSEnable": true, "ULSEnable": true,
"@ULSEnableAnon": "Equivalent to $wgULSEnable for anonymous users only. Does not have any effect if $wgULSEnable is false.", "@ULSEnableAnon": "Equivalent to $wgULSEnable for anonymous users only. Does not have any effect if $wgULSEnable is false.",