diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-06-30 23:25:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-30 23:25:27 +0300 |
commit | 680ffd796ea93e1b5e7699d126c7c5262ed0e851 (patch) | |
tree | 6476710fb8f6542fb6a0490f7ebf82eab15b9c5a /plugins | |
parent | 82d8267b5ecf163e4adfbf4d4dc705b78bf501a5 (diff) |
Make geolocation provider work with isp database only (#16163)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/GeoIp2/LocationProvider/GeoIp2/Php.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php index 6a92f4f409..c9367b1a52 100644 --- a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php +++ b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php @@ -284,15 +284,16 @@ class Php extends GeoIp2 } /** - * Returns true if this location provider is available. Piwik ships w/ the MaxMind - * PHP library, so this provider is available if a location GeoIP database can be found. + * Returns true if this location provider is available. That is the case if either a location or a isp database is + * available * * @return bool */ public function isAvailable() { - $path = self::getPathToGeoIpDatabase($this->customDbNames['loc']); - return $path !== false; + $pathLoc = self::getPathToGeoIpDatabase($this->customDbNames['loc']); + $pathIsp = self::getPathToGeoIpDatabase($this->customDbNames['isp']); + return $pathLoc !== false || $pathIsp !== false; } /** |