Switch default ULS geoip provider
Current provider is going away. Switching to another free provider. Implemented caching with a cookie for speed and to avoid generating unnecessary load on the service. Bug: T143542 Change-Id: I191d69a6fb8abe9556f475dfef1368dc9f96b846
This commit is contained in:
@@ -121,10 +121,8 @@ class UniversalLanguageSelectorHooks {
|
||||
$out->addModules( 'ext.uls.compactlinks' );
|
||||
}
|
||||
|
||||
if ( is_string( $wgULSGeoService ) ) {
|
||||
if ( $wgULSGeoService ) {
|
||||
$out->addModules( 'ext.uls.geoclient' );
|
||||
} elseif ( $wgULSGeoService === true ) {
|
||||
$out->addScript( '<script src="//meta.wikimedia.org/geoiplookup"></script>' );
|
||||
}
|
||||
|
||||
if ( self::isToolbarEnabled( $out->getUser() ) ) {
|
||||
@@ -312,7 +310,11 @@ class UniversalLanguageSelectorHooks {
|
||||
$wgWBClientSettings;
|
||||
|
||||
// Place constant stuff here (not depending on request context)
|
||||
if ( is_string( $wgULSGeoService ) ) {
|
||||
|
||||
if ( $wgULSGeoService === true ) {
|
||||
$wgULSGeoService = 'https://freegeoip.net/json/?callback=?';
|
||||
}
|
||||
if ( $wgULSGeoService ) {
|
||||
$vars['wgULSGeoService'] = $wgULSGeoService;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user