Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-06-30 23:25:27 +0300
committerGitHub <noreply@github.com>2020-06-30 23:25:27 +0300
commit680ffd796ea93e1b5e7699d126c7c5262ed0e851 (patch)
tree6476710fb8f6542fb6a0490f7ebf82eab15b9c5a /plugins/GeoIp2
parent82d8267b5ecf163e4adfbf4d4dc705b78bf501a5 (diff)
Make geolocation provider work with isp database only (#16163)
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r--plugins/GeoIp2/LocationProvider/GeoIp2/Php.php9
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;
}
/**