}
// get the total count of relationships
- $v['totalCount'] = CRM_Contact_BAO_Relationship::getRelationship($params['contact_id'], NULL, NULL, TRUE);
+ $v['totalCount'] = count($v['data']);
$values['relationship']['data'] = &$v['data'];
$values['relationship']['totalCount'] = &$v['totalCount'];
$mask = $mask & $permissionMask;
}
}
+
while ($relationship->fetch()) {
$rid = $relationship->civicrm_relationship_id;
$cid = $relationship->civicrm_contact_id;
if (!empty($relationships)) {
// get the total relationships
if ($params['context'] != 'user') {
- $params['total'] = CRM_Contact_BAO_Relationship::getRelationship($params['contact_id'],
- $relationshipStatus, 0, 1, 0, NULL, NULL, $permissionedContacts);
+ $params['total'] = count($relationships);
}
else {
// FIX ME: we cannot directly determine total permissioned relationship, hence re-fire query