Merge pull request #1775 from pratik-joshi/CRM-13237
[civicrm-core.git] / CRM / Core / BAO / EntityTag.php
index 09b320a8aff6e7363b4e6a463610f974b9316604..3aea6ff02cbef4b44583dc31d41a700197e86294 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -268,18 +268,18 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag {
    *
    * @param object  $tag    an object of a tag.
    *
-   * @return  array   $contactIds    array of contact ids
+   * @return  array   $entityIds    array of entity ids
    * @access public
    */
   function getEntitiesByTag($tag) {
-    $contactIds = array();
+    $entityIds = array();
     $entityTagDAO = new CRM_Core_DAO_EntityTag();
     $entityTagDAO->tag_id = $tag->id;
     $entityTagDAO->find();
     while ($entityTagDAO->fetch()) {
-      $contactIds[] = $entityTagDAO->contact_id;
+      $entityIds[] = $entityTagDAO->entity_id;
     }
-    return $contactIds;
+    return $entityIds;
   }
 
   /**