Пример #1
0
    if (strlen($strErrorMessage) <= 0) {
        $arModulesUpdates = CUpdateSystem::GetLoadedModuleUpdates($temporary_updates_dir, $strErrorMessage);
    }
    if (strlen($strErrorMessage) <= 0) {
        if (!CUpdateSystem::CheckVersions($arModulesUpdates, $strErrorMessage, $arLoadModules)) {
            $strErrorMessage .= GetMessage("SUP_UPD_LOAD_BREAK") . " [PU404]. ";
            CUpdateSystem::AddMessage2Log(GetMessage("SUP_UPD_LOAD_BREAK"), "PU404");
        }
    }
    $arErrorModules = array();
    $arSuccessModules = array();
    if (strlen($strErrorMessage) <= 0) {
        if (strlen($UNIID) > 0) {
            $_SESSION[$UNIID] = "Y";
        }
        if (!CUpdateSystem::UpdateKernel($temporary_updates_dir, $arLoadModules, $strErrorMessage, $arErrorModules, $arSuccessModules)) {
            $strErrorMessage .= GetMessage("SUP_BAD_UPD_INSTALL") . " [PU405]. ";
            CUpdateSystem::AddMessage2Log(GetMessage("SUP_BAD_UPD_INSTALL"), "PU405");
        } else {
            $db_events = GetModuleEvents("main", "OnUpdatesInstalled");
            while ($arEvent = $db_events->Fetch()) {
                ExecuteModuleEvent($arEvent, array("successModules" => $arSuccessModules, "loadModules" => $arLoadModules, "errorModules" => $arErrorModules, "modulesUpdates" => $arModulesUpdates));
            }
        }
    }
}
if ($TYPE == "UPDATE" && $STEP == 3 && $MAIN_RIGHT == "W") {
    CUpdateSystem::AddMessage2Log("Query loading modules: " . $load_modules);
    if (!isset($FAS) || $FAS != "Y") {
        $arLoadModules = array();
        if (strlen($load_modules) > 0) {