<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
$params['rp'] = 0;
$groups = CRM_Contact_BAO_Group::getGroupListSelector($params);
- echo json_encode($groups);
- CRM_Utils_System::civiExit();
+ CRM_Utils_JSON::output($groups);
}
else {
$sortMapper = array(
- 0 => 'groups.title', 1 => 'groups.id', 2 => 'createdBy.sort_name', 3 => '',
+ 0 => 'groups.title', 1 => 'count', 2 => 'createdBy.sort_name', 3 => '',
4 => 'groups.group_type', 5 => 'groups.visibility',
);
$iFilteredTotal = $iTotal = $params['total'];
$selectorElements = array(
- 'group_name', 'group_id', 'created_by', 'group_description',
+ 'group_name', 'count', 'created_by', 'group_description',
'group_type', 'visibility', 'org_info', 'links', 'class',
);