protected function check()
{
$response = Utils::getURL($this->endpoint, 4);
$response = json_decode($response, true);
if (!is_array($response)) {
return;
}
$this->updateInfo = ["build" => $response["lastSuccessfulBuild"]["number"], "details_url" => "http://jenkins.clearskyteam.org/job/ClearSky/" . $response["lastSuccessfulBuild"]["number"] . "/changes", "download_url" => "http://jenkins.clearskyteam.org/job/ClearSky/" . $response["lastSuccessfulBuild"]["number"] . "/artifact/releases/ClearSky-master-%23" . $response["lastSuccessfulBuild"]["number"] . ".phar"];
$response = Utils::getURL("http://jenkins.clearskyteam.org/job/ClearSky/" . $this->updateInfo['build'] . "/fingerprints/", 4);
$t = explode('<a href="/fingerprint/', $response);
if (!is_array($t)) {
return;
}
if (!isset($t[1])) {
return;
}
$j = explode('/">', $t[1]);
if (!is_array($j)) {
return;
}
$fingerprint = $j[0];
if ($fingerprint == "") {
return;
}
$this->updateInfo['fingerprint'] = $fingerprint;
$this->checkUpdate();
if ($this->server->getProperty("auto-updater.preferred-channel", "null") == "DEV") {
//Do nothing
} else {
$this->checkStable();
}
}