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@piwik.org>2018-07-10 22:44:52 +0300
committerGitHub <noreply@github.com>2018-07-10 22:44:52 +0300
commit4b88aa24c9c85c45340ca854c812c21014d86dc2 (patch)
treee1f279d3d4faa5d3ac00a523dff360e9abec3fe0 /plugins/GeoIp2
parenta4c01fe919de7c5696e3c06d2c066085e08ec255 (diff)
Disables some more feature if internet features are disabled (#13076)
* Disable GeoIP update tasks if no internet connection available * Show GeoLocation Auto Updater UI only with enabled internet connection * Throw exception if Marketplace is used without enabled internet features * Hide Marketplace menu entry if internet is disabled * Implements new plugin class method requiresInternetConnection, to automatically unloaded plugins if required * Improve how plugins not working without internet connection are shown in plugin list * Adds UI test * typo 'whether'
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r--plugins/GeoIp2/GeoIP2AutoUpdater.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/GeoIp2/GeoIP2AutoUpdater.php b/plugins/GeoIp2/GeoIP2AutoUpdater.php
index 458609aee9..4c91a8f864 100644
--- a/plugins/GeoIp2/GeoIP2AutoUpdater.php
+++ b/plugins/GeoIp2/GeoIP2AutoUpdater.php
@@ -27,6 +27,7 @@ use Piwik\Scheduler\Task;
use Piwik\Scheduler\Timetable;
use Piwik\Scheduler\Schedule\Monthly;
use Piwik\Scheduler\Schedule\Weekly;
+use Piwik\SettingsPiwik;
use Piwik\Unzip;
/**
@@ -63,6 +64,11 @@ class GeoIP2AutoUpdater extends Task
*/
public function __construct()
{
+ if (!SettingsPiwik::isInternetEnabled()) {
+ // no automatic updates possible if no internet available
+ return;
+ }
+
$schedulePeriodStr = self::getSchedulePeriod();
// created the scheduledtime instance, also, since GeoIP 2 updates are done on tuesdays,