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>2021-05-18 09:49:26 +0300
committerGitHub <noreply@github.com>2021-05-18 09:49:26 +0300
commit9c128ddd5a317ac42bd3e6f83d6fa8a3d5ef2519 (patch)
tree10168c15ebd36779455170659a76032cce6bcfb4 /plugins/UserCountry
parent62728e9fd182c5e51c7aabd0791c250410371f9f (diff)
Show available GeoIP information in diagnostics (#17573)
Diffstat (limited to 'plugins/UserCountry')
-rw-r--r--plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php b/plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php
index 00fcb59dab..e43c06960f 100644
--- a/plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php
+++ b/plugins/UserCountry/Diagnostic/GeolocationDiagnostic.php
@@ -71,6 +71,9 @@ class GeolocationDiagnostic implements Diagnostic
return [DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_WARNING, $providerWarning)];
}
- return [DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_OK)];
+ $availableInfo = LocationProvider::getProviderById($currentProviderId)->getSupportedLocationInfo();
+ $message = sprintf("%s (%s)", $currentProviderId, implode(', ', array_keys(array_filter($availableInfo))));
+
+ return [DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_OK, $message)];
}
}