Exemplo n.º 1
0
            $arParams[$param] = $_REQUEST[$param];
        }
    }
    $arParams['ENTITY_TYPE'] = 'SECTION';
    $arParams['ENTITY_ID'] = $arParams['IBLOCK_ID'];
    $arParams['ACTION'] = 'set_rights';
    $arParams['DO_NOT_REDIRECT'] = true;
    include $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/components/bitrix/webdav.iblock.rights/action.php";
    $_REQUEST["UF_USE_BP"] = $_REQUEST["UF_USE_BP"] == "Y" ? "Y" : "N";
    $_REQUEST["UF_USE_EXT_SERVICES"] = CWebDavIblock::resolveDefaultUseExtServices($_REQUEST["UF_USE_EXT_SERVICES"]);
    if ($_REQUEST["UF_USE_BP"] != $arLibrary["UF_USE_BP"] || $_REQUEST["UF_USE_EXT_SERVICES"] != $arLibrary['UF_USE_EXT_SERVICES']) {
        if (!isset($arLibrary["~UF_USE_BP"])) {
            __wd_check_uf_use_bp_property($arParams["IBLOCK_ID"]);
        }
        if (!isset($arLibrary["~UF_USE_EXT_SERVICES"])) {
            CWebDavIblock::checkUfUseExtServices((int) $arParams["IBLOCK_ID"]);
        }
        $arFields = array("IBLOCK_ID" => $arParams["IBLOCK_ID"], "UF_USE_BP" => $_REQUEST["UF_USE_BP"], "UF_USE_EXT_SERVICES" => $_REQUEST["UF_USE_EXT_SERVICES"]);
        $GLOBALS["UF_USE_BP"] = $arFields["UF_USE_BP"];
        $GLOBALS["USER_FIELD_MANAGER"]->EditFormAddFields("IBLOCK_" . $arParams["IBLOCK_ID"] . "_SECTION", $arFields);
        $bs = new CIBlockSection();
        $res = $bs->Update($arLibrary["ID"], $arFields);
    }
    $popupWindow->Close($bReload = true, $_REQUEST["back_url"]);
    die;
}
//HTML output
$popupWindow->ShowTitlebar(GetMessage("SN_TITLE"));
$popupWindow->StartDescription("bx-access-folder");
if (isset($strWarning) && $strWarning != "") {
    $popupWindow->ShowValidationError($strWarning);