'status',
'do_not_email',
'do_not_phone',
+ 'do_not_sms',
'do_not_mail',
];
$this->_searchContext = $searchContext;
- $this->_ufGroupID = CRM_Utils_Array::value('uf_group_id', $this->_formValues);
+ $this->_ufGroupID = $this->_formValues['uf_group_id'] ?? NULL;
if ($this->_ufGroupID) {
$this->_fields = CRM_Core_BAO_UFGroup::getListingFields(CRM_Core_Action::VIEW,
$this->_returnProperties['contact_type'] = 1;
$this->_returnProperties['contact_sub_type'] = 1;
$this->_returnProperties['sort_name'] = 1;
+ if (!empty($this->_returnProperties['location']) && is_array($this->_returnProperties['location'])) {
+ foreach ($this->_returnProperties['location'] as $key => $property) {
+ if (!empty($property['email'])) {
+ $this->_returnProperties['location'][$key]['on_hold'] = 1;
+ }
+ }
+ }
}
- $displayRelationshipType = CRM_Utils_Array::value('display_relationship_type', $this->_formValues);
+ $displayRelationshipType = $this->_formValues['display_relationship_type'] ?? NULL;
$operator = CRM_Utils_Array::value('operator', $this->_formValues, 'AND');
// rectify params to what proximity search expects if there is a value for prox_distance
'qs' => $qs,
'title' => $value['title'],
'ref' => $value['ref'],
- 'class' => CRM_Utils_Array::value('class', $value),
+ 'class' => $value['class'] ?? NULL,
];
}
}
$locationTypeName = "website-{$id}";
}
else {
- $locationTypeName = CRM_Utils_Array::value($id, $locationTypes);
+ $locationTypeName = $locationTypes[$id] ?? NULL;
if (!$locationTypeName) {
continue;
}
$links = self::links($this->_context, $this->_contextMenu, $this->_key);
//check explicitly added contact to a Smart Group.
- $groupID = CRM_Utils_Array::value('group', $this->_formValues);
+ $groupID = $this->_formValues['group'] ?? NULL;
$pseudoconstants = [];
// for CRM-3157 purposes
}
$row[$property] = $websiteUrl;
}
+ elseif (strpos($property, '-email') !== FALSE) {
+ list($locType) = explode("-email", $property);
+ $onholdProperty = "{$locType}-on_hold";
+
+ $row[$property] = $result->$property ?? NULL;
+ if (!empty($row[$property]) && !empty($result->$onholdProperty)) {
+ $row[$property] .= " (On Hold)";
+ }
+ }
else {
- $row[$property] = isset($result->$property) ? $result->$property : NULL;
+ $row[$property] = $result->$property ?? NULL;
}
}
);
}
elseif ((is_numeric(CRM_Utils_Array::value('geo_code_1', $row))) ||
- (!empty($row['city']) &&
- CRM_Utils_Array::value('state_province', $row)
- )
+ (!empty($row['city']) && !empty($row['state_province']))
) {
$row['action'] = CRM_Core_Action::formLink(
$links,
}
if ((!is_numeric(CRM_Utils_Array::value('geo_code_1', $row))) &&
- (empty($row['city']) ||
- !CRM_Utils_Array::value('state_province', $row)
- )
+ (empty($row['city']) || empty($row['state_province']))
) {
$mask = $mask & 4095;
}