Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused method CRM_Contact_BAO_Contact_Utils::maxLocations #15091

Merged
merged 1 commit into from
Aug 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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