$result->contact_id
);
- $row['contact_type_orig'] = $result->contact_type;
+ $row['contact_type_orig'] = $result->contact_sub_type ? $result->contact_sub_type : $result->contact_type;
$row['contact_sub_type'] = $result->contact_sub_type ?
CRM_Contact_BAO_ContactType::contactTypePairs(FALSE, $result->contact_sub_type, ', ') : $result->contact_sub_type;
$row['contact_id'] = $result->contact_id;
// allow components to add more actions
CRM_Core_Component::searchAction($row, $row['contact_id']);
- $contactType = null;
- if ( CRM_Utils_Array::value('contact_sub_type', $row) ) {
- $contactType = $row['contact_sub_type'];
- }
- elseif ( CRM_Utils_Array::value('contact_type_orig', $row) ) {
- $contactType = $row['contact_type_orig'];
- }
-
- if ( $contactType ) {
- $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($contactType,
+ if (!empty($row['contact_type_orig'])) {
+ $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($row['contact_type_orig'],
FALSE, $row['contact_id']);
}
}