$params['street_address']['title'] = 'Primary Address Street Address';
$params['supplemental_address_1']['title'] = 'Primary Address Supplemental Address 1';
$params['supplemental_address_2']['title'] = 'Primary Address Supplemental Address 2';
+ $params['current_employer']['title'] = 'Current Employer';
$params['city']['title'] = 'Primary Address City';
$params['postal_code_suffix']['title'] = 'Primary Address Post Code Suffix';
$params['postal_code']['title'] = 'Primary Address Post Code';
$params['state_province_id']['title'] = 'Primary Address State Province ID';
$params['state_province_name']['title'] = 'Primary Address State Province Name';
$params['state_province']['title'] = 'Primary Address State Province';
- $params['country_id']['title'] = 'Primary Address State Province ID';
+ $params['country_id']['title'] = 'Primary Address Country ID';
$params['country']['title'] = 'Primary Address country';
$params['worldregion_id']['title'] = 'Primary Address World Region ID';
$params['worldregion']['title'] = 'Primary Address World Region';
case 'phone':
case 'email':
$actualSelectElements[] = $select[] = ($value == 'address') ? $selectText : $value;
+ if ($value == 'phone') {
+ $actualSelectElements[] = $select[] = 'phone_ext';
+ }
$from[$value] = "LEFT JOIN civicrm_{$value} {$suffix} ON ( cc.id = {$suffix}.contact_id AND {$suffix}.is_primary = 1 ) ";
break;
}
}
+ if (CRM_Utils_Array::value('contact_sub_type', $params)) {
+ $contactSubType = CRM_Utils_Type::escape($params['contact_sub_type'], 'String');
+ $where .= " AND cc.contact_sub_type = '{$contactSubType}'";
+ }
+
//set default for current_employer or return contact with particular id
if (CRM_Utils_Array::value('id', $params)) {
$where .= " AND cc.id = " . (int) $params['id'];