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:
authorThomas Steur <thomas.steur@googlemail.com>2014-06-05 08:44:37 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-05 08:44:37 +0400
commit3e03b0a7ca4055b4f05be7d4ec7bcfaacf364eff (patch)
tree47afa18c0b671f38e17405078bdee156ad020058 /plugins/CoreUpdater/Tasks.php
parent0ed11b178860844b97b967f6cfa1ffd12ab2eaab (diff)
refs #5301 started to simplify scheduled tasks API while staying backwards compatible
Diffstat (limited to 'plugins/CoreUpdater/Tasks.php')
-rw-r--r--plugins/CoreUpdater/Tasks.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/CoreUpdater/Tasks.php b/plugins/CoreUpdater/Tasks.php
new file mode 100644
index 0000000000..f8c652781c
--- /dev/null
+++ b/plugins/CoreUpdater/Tasks.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Plugins\CoreUpdater;
+
+class Tasks extends \Piwik\Plugin\Tasks
+{
+ public function schedule()
+ {
+ $this->daily('sendNotificationIfUpdateAvailable', null, self::LOWEST_PRIORITY);
+ }
+
+ public function sendNotificationIfUpdateAvailable()
+ {
+ $coreUpdateCommunication = new UpdateCommunication();
+ if ($coreUpdateCommunication->isEnabled()) {
+ $coreUpdateCommunication->sendNotificationIfUpdateAvailable();
+ }
+ }
+} \ No newline at end of file