Beispiel #1
0
function InstallationAborted($msg = '', $action = '')
{
    global $TMP_FOLDER;
    switch ($action) {
        case 'patch':
            nc_print_status(($msg ? $msg . "<br>" : "") . TOOLS_PATCH_ERR_CANTINSTALL, "error");
            PatchForm();
            PatchList();
            break;
        case 'module':
            nc_print_status(($msg ? $msg . "<br>" : "") . TOOLS_MODULES_ERR_INSTALL, "error");
            break;
        case 'activation':
            nc_print_status($msg ? $msg : TOOLS_PATCH_ERROR, "error");
            nc_activation_show_form();
            break;
        default:
            nc_print_status($msg ? $msg : TOOLS_PATCH_ERROR, "error");
            break;
    }
    DeleteFilesInDirectory($TMP_FOLDER);
    EndHtml();
    exit;
}
Beispiel #2
0
        if ($CreatLinksResult['links']) {
            $PatchResult['links'] = str_replace("%COUNT", $CreatLinksResult['links'], TOOLS_PATCH_INFO_SYMLINKS_EXEC);
        }
        // result text
        if (!empty($PatchResult)) {
            $PatchResultText = join("\r\n", $PatchResult) . "\r\n";
        }
        // after action in install.inc.php
        if (function_exists("InstallPatchAfterAction")) {
            InstallPatchAfterAction();
        }
        // clear tmp folder
        DeleteFilesInDirectory($TMP_FOLDER);
        // patch installed OK
        nc_print_status(TOOLS_PATCH_INSTALLED . ".", "ok");
        break;
    case 5:
        BeginHtml($Title5, $Title5, "http://" . $DOC_DOMAIN . "/settings/patch/");
        $perm->ExitIfNotAccess(NC_PERM_PATCH, 0, 0, 0, 1);
        $UI_CONFIG->activeTab = 'path-info';
        $UI_CONFIG->headerText = TOOLS_PATCH_INSTRUCTION;
        $UI_CONFIG->locationHash = '#tools.patch(5)';
        $lang = 'ru';
        $encode = $nc_core->NC_UNICODE ? 'utf8' : 'cp1251';
        require $ADMIN_FOLDER . "patch/information.{$lang}.{$encode}.php";
        EndHtml();
        exit;
}
PatchForm();
PatchList();
EndHtml();