X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FIM.php;h=a66907ad6a264773be80908c245943acf06ce3b3;hb=553ffa22464ff37a28a070458bcd52097b54235f;hp=e37eec8cdd671f9f715cb058a1f9a24313e15803;hpb=a5d44edbee5498fa4195c5f3571db6b820185fa8;p=civicrm-core.git diff --git a/CRM/Core/BAO/IM.php b/CRM/Core/BAO/IM.php index e37eec8cdd..a66907ad6a 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 @@ -172,8 +166,8 @@ ORDER BY cim.is_primary DESC, im_id ASC "; /** * Call common delete function */ - static function del($id) { + public static function del($id) { return CRM_Contact_BAO_Contact::deleteObjectWithPrimary('IM', $id); } -} +}