X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FIM.php;h=2f3830d419f220258cc2c9951783424cf7a5de60;hb=fb1b8b9d4c10122a89f2e017497071a734496fe6;hp=37552edab7889334af0e9e23a4d5dbcc78b90f09;hpb=d69fa047cdc76b337124f93354abb2e1bf207a58;p=civicrm-core.git diff --git a/CRM/Core/BAO/IM.php b/CRM/Core/BAO/IM.php index 37552edab7..2f3830d419 100644 --- a/CRM/Core/BAO/IM.php +++ b/CRM/Core/BAO/IM.php @@ -1,7 +1,7 @@ array($id, 'Integer')); - $ims = $values = array(); - $dao = CRM_Core_DAO::executeQuery($query, $params); + $ims = $values = array(); + $dao = CRM_Core_DAO::executeQuery($query, $params); $count = 1; while ($dao->fetch()) { $values = array( @@ -128,23 +126,19 @@ ORDER BY /** * Get all the ims for a specified location_block id, with the primary im being first * - * @param array $entityElements the array containing entity_id and - * entity_table name + * @param array $entityElements + * The array containing entity_id and. + * entity_table name * - * @return array the array of im details - * @access public - * @static + * @return array + * the array of im details */ - static function allEntityIMs(&$entityElements) { + public static function allEntityIMs(&$entityElements) { if (empty($entityElements)) { return NULL; } - - $entityId = $entityElements['entity_id']; $entityTable = $entityElements['entity_table']; - - $sql = "SELECT cim.name as im, ltype.name as locationType, cim.is_primary as is_primary, cim.id as im_id, cim.location_type_id as locationTypeId FROM civicrm_loc_block loc, civicrm_im cim, civicrm_location_type ltype, {$entityTable} ev WHERE ev.id = %1 @@ -170,10 +164,10 @@ ORDER BY cim.is_primary DESC, im_id ASC "; } /** - * Call common delete function + * Call common delete function. */ - static function del($id) { + public static function del($id) { return CRM_Contact_BAO_Contact::deleteObjectWithPrimary('IM', $id); } -} +}