questlab/www/analytics/plugins/CoreUpdater/Tasks.php
2016-04-10 18:55:57 +02:00

25 lines
No EOL
637 B
PHP

<?php
/**
* Piwik - free/libre analytics platform
*
* @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();
}
}
}