Ejemplo n.º 1
0
    $arResult['CATEGORIES'][strtolower($arCat["NAME"])] = $arCat;
}
$arResult['DB_LIST'] =& $dbCatList;
$arCatName = $categories->getItemsNames();
$arCatNameExists = array();
if (!empty($arCatName)) {
    // checking the category on the "red link"
    $arFilter = array('IBLOCK_ID' => $arParams['IBLOCK_ID'], 'CHECK_PERMISSIONS' => 'N', 'ACTIVE' => 'Y', 'NAME' => $arCatName);
    if (CWikiSocnet::IsSocNet()) {
        $arFilter['SUBSECTION'] = CWikiSocnet::$iCatId;
    }
    $rsElement = CIBlockElement::GetList(array(), $arFilter, false, false, array());
    while ($arElement = $rsElement->GetNext()) {
        $arCatNameExists[] = substr($arElement['NAME'], strpos($arElement['NAME'], ':') + 1);
    }
    if (!empty($arCatNameExists)) {
        foreach ($arCatNameExists as $sCatName) {
            $sCatNameLow = strtolower($sCatName);
            if (isset($arResult['CATEGORIES'][$sCatNameLow])) {
                $arResult['CATEGORIES'][$sCatNameLow]['IS_RED'] = 'N';
                // exclude the very category page
                if (!CWikiUtils::isVirtualCategoryExist($sCatName)) {
                    $arResult['CATEGORIES'][$sCatNameLow]['CNT']--;
                }
            }
        }
    }
}
include_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components/bitrix/wiki/include/nav.php';
$this->IncludeComponentTemplate();
unset($GLOBALS['arParams']);