Remove unused method CRM_Contact_BAO_Contact_Utils::maxLocations
authorJKingsnorth <john@johnkingsnorth.co.uk>
Wed, 21 Aug 2019 08:14:31 +0000 (09:14 +0100)
committerJKingsnorth <john@johnkingsnorth.co.uk>
Wed, 21 Aug 2019 08:14:31 +0000 (09:14 +0100)
CRM/Contact/BAO/Contact/Utils.php

index 1d9f166a7131f492c503051b79195ea34ce9c977..41659ba38acc3ca3c917c4edf1820e0f501b8ac3 100644 (file)
@@ -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.
    *