/** * Forces a check for updates and re-renders the header message. * * This will check piwik.org at most once per 10s. */ public function checkForUpdates() { Piwik::checkUserHasSomeAdminAccess(); $this->checkTokenInUrl(); // perform check (but only once every 10s) UpdateCheck::check($force = false, UpdateCheck::UI_CLICK_CHECK_INTERVAL); MarketplaceApiClient::clearAllCacheEntries(); $view = new View('@CoreHome/checkForUpdates'); $this->setGeneralVariablesView($view); return $view->render(); }
public function updateCheck() { UpdateCheck::check(); }
protected function isNewVersionAvailable() { UpdateCheck::check(); $hasUpdate = UpdateCheck::isNewestVersionAvailable(); if (!$hasUpdate) { return false; } $latestVersion = self::getLatestVersion(); if (!$this->isVersionLike($latestVersion)) { return false; } return $hasUpdate; }