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:
Diffstat (limited to 'plugins/GeoIp2/LocationProvider/GeoIp2/Php.php')
-rw-r--r--plugins/GeoIp2/LocationProvider/GeoIp2/Php.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
index 53dee81247..90823971ef 100644
--- a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
+++ b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
@@ -105,6 +105,11 @@ class Php extends GeoIp2
case 'GeoIP2-Enterprise':
case 'GeoLite2-City':
case 'GeoIP2-City':
+ case 'GeoIP2-City-Africa':
+ case 'GeoIP2-City-Asia-Pacific':
+ case 'GeoIP2-City-Europe':
+ case 'GeoIP2-City-North-America':
+ case 'GeoIP2-City-South-America':
if ($reader->metadata()->databaseType === 'GeoIP2-Enterprise') {
$lookupResult = $reader->enterprise($ip);
} else {
@@ -227,8 +232,13 @@ class Php extends GeoIp2
if ($reader) {
switch ($reader->metadata()->databaseType) {
case 'GeoIP2-Enterprise':
- case 'GeoIP2-City':
case 'GeoLite2-City':
+ case 'GeoIP2-City':
+ case 'GeoIP2-City-Africa':
+ case 'GeoIP2-City-Asia-Pacific':
+ case 'GeoIP2-City-Europe':
+ case 'GeoIP2-City-North-America':
+ case 'GeoIP2-City-South-America':
$result[self::REGION_CODE_KEY] = true;
$result[self::REGION_NAME_KEY] = true;
$result[self::CITY_NAME_KEY] = true;
@@ -273,7 +283,7 @@ class Php extends GeoIp2
. '</a>';
$availableDatabaseTypes = array();
- if (self::getPathToGeoIpDatabase(['GeoIP2-Enterprise.mmdb', 'GeoIP2-City.mmdb', 'GeoLite2-City.mmdb']) !== false) {
+ if (self::getPathToGeoIpDatabase(['GeoIP2-City.mmdb', 'GeoIP2-City-Africa.mmdb', 'GeoIP2-City-Asia-Pacific.mmdb', 'GeoIP2-City-Europe.mmdb', 'GeoIP2-City-North-America.mmdb', 'GeoIP2-City-South-America.mmdb', 'GeoIP2-Enterprise.mmdb', 'GeoLite2-City.mmdb']) !== false) {
$availableDatabaseTypes[] = Piwik::translate('UserCountry_City');
}
if (self::getPathToGeoIpDatabase(['GeoIP2-Country.mmdb', 'GeoLite2-Country.mmdb']) !== false) {