Exemplo n.º 1
0
            $urlParams[] = $arFilter['id'];
        }
    }
    $urlParams[] = 'clear_filter';
    $CGridOptions->GetFilter(array());
    LocalRedirect($APPLICATION->GetCurPageParam('', $urlParams));
}
$_arSort = $CGridOptions->GetSorting(array('sort' => array('nearest_activity' => 'asc'), 'vars' => array('by' => 'by', 'order' => 'order')));
$arResult['SORT'] = !empty($arSort) ? $arSort : $_arSort['sort'];
$arResult['SORT_VARS'] = $_arSort['vars'];
if ($isInExportMode) {
    $arFilter['EXPORT'] = 'Y';
}
$arSelect = $CGridOptions->GetVisibleColumns();
// Remove column for deleted UF
if ($CCrmUserType->NormalizeFields($arSelect)) {
    $CGridOptions->SetVisibleColumns($arSelect);
}
$arSelectMap = array_fill_keys($arSelect, true);
$arResult['ENABLE_BIZPROC'] = IsModuleInstalled('bizproc');
$arResult['ENABLE_TASK'] = IsModuleInstalled('tasks');
// Fill in default values if empty
if (empty($arSelectMap)) {
    foreach ($arResult['HEADERS'] as $arHeader) {
        if ($arHeader['default']) {
            $arSelectMap[$arHeader['id']] = true;
        }
    }
    //Disable bizproc fields processing
    $arResult['ENABLE_BIZPROC'] = false;
} else {