Ejemplo n.º 1
0
function CheckZPanelLatestVersion()
{
    // Grab the latest version of ZPanel from the ZPanel API servers and cache it into the database.
    $live_version = ws_generic::ReadURLRequestResult(ctrl_options::GetSystemOption('update_url'));
    if (!$live_version) {
        return false;
    }
    $versionnumber = ws_generic::JSONToArray($live_version);
    ctrl_options::SetSystemOption('latestzpversion', $versionnumber[0]['version']);
    return true;
}
Ejemplo n.º 2
0
function CheckMADminLatestVersion()
{
    // Grab the latest version of MADmin from the MADmin API servers and cache it into the database.
    $live_version = ws_generic::ReadURLRequestResult(ctrl_options::GetSystemOption('update_url'));
    if (!$live_version) {
        return false;
    }
    $versionnumber = ws_generic::JSONToArray($live_version);
    # MADmin API returns simple object not in an array like it was for zpanel.
    #    if(count($versionnumber) > 1) {
    #        $currentVersionSetting = current($versionnumber);
    #        $currentVersion = $currentVersionSetting['version'];
    #    } else {
    $currentVersion = $versionnumber['version'];
    #    }
    ctrl_options::SetSystemOption('latestzpversion', $currentVersion);
    return true;
}