Skip to content

Commit

Permalink
Merge pull request #15091 from JKingsnorth/rm-unused-maxlocations
Browse files Browse the repository at this point in the history
Remove unused method CRM_Contact_BAO_Contact_Utils::maxLocations
  • Loading branch information
eileenmcnaughton authored Aug 21, 2019
2 parents 2f2b15d + fe8c39e commit 79c32ad
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions CRM/Contact/BAO/Contact/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,33 +242,6 @@ public static function validChecksum($contactID, $inputCheck) {
return ($inputTS + ($inputLF * 60 * 60) >= $now);
}

/**
* Get the count of contact loctions.
*
* @param int $contactId
* Contact id.
*
* @return int
* max locations for the contact
*/
public static function maxLocations($contactId) {
$contactLocations = [];

// find number of location blocks for this contact and adjust value accordinly
// get location type from email
$query = "
( SELECT location_type_id FROM civicrm_email WHERE contact_id = {$contactId} )
UNION
( SELECT location_type_id FROM civicrm_phone WHERE contact_id = {$contactId} )
UNION
( SELECT location_type_id FROM civicrm_im WHERE contact_id = {$contactId} )
UNION
( SELECT location_type_id FROM civicrm_address WHERE contact_id = {$contactId} )
";
$dao = CRM_Core_DAO::executeQuery($query);
return $dao->N;
}

/**
* Create Current employer relationship for a individual.
*
Expand Down

0 comments on commit 79c32ad

Please sign in to comment.