do { if ($res["ID"] == $arParams["ROOT_SECTION_ID"]) { $bRootFounded = true; continue; } if (!$bRootFounded) { continue; } $arResult["NAV_CHAIN"][] = $res; $arResult["NAV_CHAIN_PATH"][] = CWebDavIblock::_uencode($res["NAME"], array("utf8" => "Y", "convert" => $arParams["CONVERT_PATH"] == true ? "full" : "allowed")); } while ($res = $db_res->Fetch()); } } /************** Path ***********************************************/ $path = $arResult["NAV_CHAIN_PATH"]; $path[] = CWebDavIblock::_uencode($arResult["ELEMENT"]["NAME"], array("utf8" => "Y", "convert" => "allowed")); $arResult["ELEMENT"]["URL"]["THIS"] = CComponentEngine::MakePathFromTemplate($arParams["SECTIONS_URL"], array("PATH" => implode("/", $path))); /******************************************************************** /Data ********************************************************************/ /******************************************************************** Action ********************************************************************/ if ((!empty($_POST["HISTORY_ID"]) || !empty($_GET["history_id"])) && check_bitrix_sessid()) { $arID = !empty($_POST["HISTORY_ID"]) ? $_POST["HISTORY_ID"] : $_GET["history_id"]; $arID = is_array($arID) ? $arID : array($arID); $ob = new CWebDavIblock($arParams['IBLOCK_ID']); foreach ($arID as $ID) { if (strlen($ID) <= 0 || empty($arResult['VERSIONS'][$ID])) { continue; }