} } if (false == $boolFlag) { if ($ex = $APPLICATION->GetException()) { $strWarning .= $ex->GetString() . "<br>"; $bVarsFromForm = true; } } } if (!$bVarsFromForm) { if ($bBizproc && $_REQUEST['BIZ_PROC_ADD_DEFAULT_TEMPLATES'] == 'Y' && CBPDocument::GetNumberOfWorkflowTemplatesForDocumentType(array("iblock", "CIBlockDocument", "iblock_" . $ID)) <= 0 && $arFields["BIZPROC"] == "Y") { CBPDocument::AddDefaultWorkflowTemplates(array("iblock", "CIBlockDocument", "iblock_" . $ID)); } $DB->Commit(); //Check if index needed CIBlock::CheckForIndexes($ID); if ($bCatalog) { if (isset($boolNeedAgent) && $boolNeedAgent == true) { $intYandexExport = CCatalog::GetList(array(), array('YANDEX_EXPORT' => 'Y'), array()); CAgent::RemoveAgent("CCatalog::PreGenerateXML(\"yandex\");", "catalog"); if (0 < $intYandexExport) { CAgent::AddAgent("CCatalog::PreGenerateXML(\"yandex\");", "catalog", "N", IntVal(COption::GetOptionString("catalog", "yandex_xml_period", "24")) * 60 * 60, "", "Y"); } } } $ob = new CAutoSave(); if (strlen($apply) <= 0) { if (strlen($_REQUEST["return_url"]) > 0) { LocalRedirect($_REQUEST["return_url"]); } else { LocalRedirect("/bitrix/admin/iblock_admin.php?type=" . $type . "&lang=" . LANG . "&admin=" . ($_REQUEST["admin"] == "Y" ? "Y" : "N"));