}
$offset = $count = 0;
- if (!empty($_GET['page'])) {
- $page = (int) $_GET['page'];
+ if (!empty($_GET['page_num'])) {
+ $page = (int) $_GET['page_num'];
$offset = $limit * ($page - 1);
$limit++;
}
}
public static function groupTree() {
- header('Content-Type: application/json');
+ CRM_Utils_System::setHttpHeader('Content-Type', 'application/json');
$gids = CRM_Utils_Type::escape($_GET['gids'], 'String');
echo CRM_Contact_BAO_GroupNestingCache::json($gids);
CRM_Utils_System::civiExit();
* Delete custom value.
*/
public static function deleteCustomValue() {
- header('Content-Type: text/plain');
+ CRM_Utils_System::setHttpHeader('Content-Type', 'text/plain');
$customValueID = CRM_Utils_Type::escape($_REQUEST['valueID'], 'Positive');
$customGroupID = CRM_Utils_Type::escape($_REQUEST['groupID'], 'Positive');
$userEmail
) = CRM_Contact_BAO_Contact_Location::getEmailDetails($contactID);
- header('Content-Type: text/plain');
+ CRM_Utils_System::setHttpHeader('Content-Type', 'text/plain');
if ($userEmail) {
echo $userEmail;
}
}
}
- header('Content-Type: application/json');
+ CRM_Utils_System::setHttpHeader('Content-Type', 'application/json');
echo CRM_Utils_JSON::encodeDataTableSelector($searchRows, $sEcho, $iTotal, $iFilteredTotal, $selectorElements);
CRM_Utils_System::civiExit();