From: JKingsnorth Date: Wed, 21 Aug 2019 08:14:31 +0000 (+0100) Subject: Remove unused method CRM_Contact_BAO_Contact_Utils::maxLocations X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fe8c39ef275af1a442c32bb8c311c12cf17324f8;p=civicrm-core.git Remove unused method CRM_Contact_BAO_Contact_Utils::maxLocations --- diff --git a/CRM/Contact/BAO/Contact/Utils.php b/CRM/Contact/BAO/Contact/Utils.php index 1d9f166a71..41659ba38a 100644 --- a/CRM/Contact/BAO/Contact/Utils.php +++ b/CRM/Contact/BAO/Contact/Utils.php @@ -242,33 +242,6 @@ WHERE id IN ( $idString ) 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. *