check() public static method

Check for a newer version
public static check ( boolean $force = false, integer $interval = null )
$force boolean Force check
$interval integer Interval used for update checks
Exemplo n.º 1
0
 /**
  * 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();
 }
Exemplo n.º 2
0
 public function updateCheck()
 {
     UpdateCheck::check();
 }
Exemplo n.º 3
0
 protected function isNewVersionAvailable()
 {
     UpdateCheck::check();
     $hasUpdate = UpdateCheck::isNewestVersionAvailable();
     if (!$hasUpdate) {
         return false;
     }
     $latestVersion = self::getLatestVersion();
     if (!$this->isVersionLike($latestVersion)) {
         return false;
     }
     return $hasUpdate;
 }