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/Tasks.php')
-rw-r--r--plugins/GeoIp2/Tasks.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/GeoIp2/Tasks.php b/plugins/GeoIp2/Tasks.php
new file mode 100644
index 0000000000..7fc299e03e
--- /dev/null
+++ b/plugins/GeoIp2/Tasks.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Plugins\GeoIp2;
+
+use Piwik\Plugins\UserCountry\UserCountry;
+use Piwik\SettingsPiwik;
+
+class Tasks extends \Piwik\Plugin\Tasks
+{
+ public function schedule()
+ {
+ // add the auto updater task if GeoIP admin is enabled
+ if (UserCountry::isGeoLocationAdminEnabled() && SettingsPiwik::isInternetEnabled() === true) {
+ $this->scheduleTask(new GeoIP2AutoUpdater());
+ }
+ }
+} \ No newline at end of file