Example #1
0
    if (strlen($strErrorMessage) <= 0) {
        $temporary_updates_dir = "";
        if (!CUpdateSystem::UnGzipArchive($temporary_updates_dir, $strErrorMessage, "Y")) {
            $strErrorMessage .= GetMessage("SUP_UPD_LOAD_BREAK") . " [PU303]. ";
            CUpdateSystem::AddMessage2Log(GetMessage("SUP_UPD_LOAD_BREAK"), "PU303");
        }
    }
    if (strlen($strErrorMessage) <= 0) {
        if (!CUpdateSystem::CheckUpdatability($temporary_updates_dir, $strErrorMessage)) {
            $strErrorMessage .= GetMessage("SUP_UPD_LOAD_BREAK") . " [PU304]. ";
            CUpdateSystem::AddMessage2Log(GetMessage("SUP_UPD_LOAD_BREAK"), "PU304");
        }
    }
    $arModulesUpdates = false;
    if (strlen($strErrorMessage) <= 0) {
        $arModulesUpdates = CUpdateSystem::GetLoadedModuleUpdates($temporary_updates_dir, $strErrorMessage);
    }
    if (strlen($strErrorMessage) <= 0) {
        if (!CUpdateSystem::CheckVersions($arModulesUpdates, $strErrorMessage, false)) {
            $strErrorMessage .= GetMessage("SUP_UPD_LOAD_BREAK") . " [PU305]. ";
            CUpdateSystem::AddMessage2Log(GetMessage("SUP_UPD_LOAD_BREAK"), "PU305");
        }
    }
    if (strlen($strErrorMessage) > 0) {
        $STEP = 2;
    }
}
if ($TYPE == "UPDATE" && $STEP == 2 && $MAIN_RIGHT == "W") {
    $arModulesUpdates = CUpdateSystem::GetServerModuleUpdates($strErrorMessage, LANG, $stableVersionsOnly);
}
if ($TYPE == "UPDATE" && $STEP == 1) {