Beispiel #1
0
            foreach ($userBindings[$userID] as $itemKey) {
                if (isset($items[$itemKey])) {
                    $item =& $items[$itemKey];
                    $item['USER_LOGIN'] = $user['LOGIN'];
                    $item['USER_NAME'] = $user['NAME'];
                    $item['USER_LAST_NAME'] = $user['LAST_NAME'];
                    $item['USER_SECOND_NAME'] = $user['SECOND_NAME'];
                    unset($item);
                }
            }
        }
    }
}
$enums = array('EVENT_TYPES' => $arResult['EVENT_TYPES']);
foreach ($items as &$item) {
    CCrmMobileHelper::PrepareInvoiceEventItem($item, $arParams, $event, $enums);
}
unset($item);
$arResult['ITEMS'] = array_values($items);
unset($items);
//NEXT_PAGE_URL, SEARCH_PAGE_URL, SERVICE_URL -->
if ($arResult['PAGE_NEXT_NUMBER'] > $arResult['PAGE_NAVCOUNT']) {
    $arResult['NEXT_PAGE_URL'] = '';
} else {
    $arResult['NEXT_PAGE_URL'] = $APPLICATION->GetCurPageParam('AJAX_CALL=Y&PAGING=Y&FORMAT=json&' . $arResult['PAGER_PARAM'] . '=' . $arResult['PAGE_NEXT_NUMBER'], array('AJAX_CALL', 'PAGING', 'FORMAT', $arResult['PAGER_PARAM']));
}
$arResult['SERVICE_URL'] = '';
//<-- NEXT_PAGE_URL, SEARCH_PAGE_URL, SERVICE_URL
$format = isset($_REQUEST['FORMAT']) ? strtolower($_REQUEST['FORMAT']) : '';
// Only JSON format is supported
if ($format !== '' && $format !== 'json') {