civicrm_state_province.abbreviation as state,
civicrm_country.name as country,
civicrm_email.email as email,
+ civicrm_contact.contact_type as contact_type,
civicrm_phone.phone as phone,
civicrm_contact.id as civicrm_contact_id,
civicrm_relationship.contact_id_b as contact_id_b,
if ($direction == 'a_b') {
$select .= ', civicrm_relationship_type.label_a_b as label_a_b,
- civicrm_relationship_type.label_b_a as relation,
- civicrm_contact.contact_type as contact_type_a_b ';
+ civicrm_relationship_type.label_b_a as relation ';
}
else {
$select .= ', civicrm_relationship_type.label_a_b as label_a_b,
- civicrm_relationship_type.label_a_b as relation,
- civicrm_contact.contact_type as contact_type_b_a ';
+ civicrm_relationship_type.label_a_b as relation ';
}
}
$values[$rid]['cid'] = $cid;
$values[$rid]['contact_id_a'] = $relationship->contact_id_a;
$values[$rid]['contact_id_b'] = $relationship->contact_id_b;
- $values[$rid]['contact_type_a_b'] = $relationship->contact_type_a_b;
- $values[$rid]['contact_type_b_a'] = $relationship->contact_type_b_a;
+ $values[$rid]['contact_type'] = $relationship->contact_type;
$values[$rid]['relationship_type_id'] = $relationship->civicrm_relationship_type_id;
$values[$rid]['relation'] = $relationship->relation;
$values[$rid]['name'] = $relationship->sort_name;
// format params
foreach ($relationships as $relationshipId => $values) {
//Add image icon for related contacts: CRM-14919
- $icon = CRM_Contact_BAO_Contact_Utils::getImage($values['contact_type_a_b'],
+ $icon = CRM_Contact_BAO_Contact_Utils::getImage($values['contact_type'],
FALSE,
$values['cid']
);