diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-11-16 02:29:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-16 02:29:09 +0300 |
commit | b141842a70535f33d878731b7f682d7dbaf44dca (patch) | |
tree | 56d2b243ff0674af56459b072ef76a2e173bc422 /plugins/GeoIp2 | |
parent | eed9424f44a93780d1a7f549719b817485035b1f (diff) |
Make it clear that tracking ISP data requires Provider plugin (#16718)
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r-- | plugins/GeoIp2/LocationProvider/GeoIp2/Php.php | 1 | ||||
-rw-r--r-- | plugins/GeoIp2/lang/en.json | 1 | ||||
-rw-r--r-- | plugins/GeoIp2/templates/_updaterManage.twig | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php index 739df5f044..3ff3875b42 100644 --- a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php +++ b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php @@ -432,6 +432,7 @@ class Php extends GeoIp2 $view->geoIPUpdatePeriod = GeoIP2AutoUpdater::getSchedulePeriod(); $view->hasGeoIp2Provider = Manager::getInstance()->isPluginActivated('GeoIp2'); + $view->isProviderPluginActive = Manager::getInstance()->isPluginActivated('Provider'); $geoIPDatabasesInstalled = $view->hasGeoIp2Provider ? GeoIp2::isDatabaseInstalled() : false; diff --git a/plugins/GeoIp2/lang/en.json b/plugins/GeoIp2/lang/en.json index bee4e21e16..4f57ee1665 100644 --- a/plugins/GeoIp2/lang/en.json +++ b/plugins/GeoIp2/lang/en.json @@ -35,6 +35,7 @@ "InvalidGeoIPUpdatePeriod": "Invalid period for the GeoIP updater: %1$s. Valid values are %2$s.", "IPurchasedGeoIPDBs": "I purchased more accurate databases from %3$sdbip%4$s or %1$sMaxMind%2$s and want to setup automatic updates.", "ISPDatabase": "ISP Database", + "ISPRequiresProviderPlugin": "Tracking Internet service providers requires the Provider plugin to be installed and activated.", "IWantToDownloadFreeGeoIP": "I want to download the free DBIP database...", "PluginDescription": "Provides DBIP / GeoIP2 location providers.", "LocationDatabase": "Location Database", diff --git a/plugins/GeoIp2/templates/_updaterManage.twig b/plugins/GeoIp2/templates/_updaterManage.twig index 07c1db992f..be34cdad79 100644 --- a/plugins/GeoIp2/templates/_updaterManage.twig +++ b/plugins/GeoIp2/templates/_updaterManage.twig @@ -22,6 +22,10 @@ ng-model="locationUpdater.ispDbUrl" introduction="{{ 'GeoIp2_ISPDatabase'|translate|e('html_attr') }}" data-title="{{ 'Actions_ColumnDownloadURL'|translate|e('html_attr') }}" + disabled="{{ not isProviderPluginActive }}" + {% if not isProviderPluginActive %} + inline-help="<div class='alert alert-warning'>{{ 'GeoIp2_ISPRequiresProviderPlugin'|translate|e('html_attr') }}</div>" + {% endif %} value="{{ geoIPIspUrl }}"> </div> |