Merge pull request #8057 from eileenmcnaughton/CRM-18341
[civicrm-core.git] / CRM / Contact / BAO / GroupContact.php
index 7306a4c0d0b8ca887269c9ce90970f8d949659be..fabed592d135e95e782f16e0dcb786fd47c7fa34 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
  */
 class CRM_Contact_BAO_GroupContact extends CRM_Contact_DAO_GroupContact {
 
@@ -320,9 +320,10 @@ class CRM_Contact_BAO_GroupContact extends CRM_Contact_DAO_GroupContact {
    *
    * @param bool $excludeHidden
    *
-   * @return array (reference)|int $values
-   *   the relevant data object values for the contact or
-   *   the total count when $count is TRUE
+   * @param int $groupId
+   *
+   * @return array|int $values
+   *   the relevant data object values for the contact or the total count when $count is TRUE
    */
   public static function &getContactGroup(
     $contactId,
@@ -446,7 +447,7 @@ class CRM_Contact_BAO_GroupContact extends CRM_Contact_DAO_GroupContact {
    * @param int $contactId
    *   Id of the contact.
    * @param int $groupID
-   *   Id of a perticuler group.
+   *   Id of a particular group.
    * @param string $method
    *   If we want the subscription history details for a specific method.
    *
@@ -488,7 +489,7 @@ SELECT    *
    * Method to get Group Id.
    *
    * @param int $groupContactID
-   *   Id of a perticuler group.
+   *   Id of a particular group.
    *
    *
    * @return groupID
@@ -575,7 +576,7 @@ SELECT    *
     }
 
     $params = array(
-      array('group', 'IN', array($groupID => 1), 0, 0),
+      array('group', 'IN', array($groupID), 0, 0),
       array('contact_id', '=', $contactID, 0, 0),
     );
     list($contacts, $_) = CRM_Contact_BAO_Query::apiQuery($params, array('contact_id'));