fixes for entity delete function, CRM-14052
authorkurund <kurund@civicrm.org>
Wed, 8 Jan 2014 19:38:31 +0000 (11:38 -0800)
committerkurund <kurund@civicrm.org>
Wed, 8 Jan 2014 19:38:31 +0000 (11:38 -0800)
----------------------------------------
* CRM-14052: Tagset fixes
  http://issues.civicrm.org/jira/browse/CRM-14052

CRM/Core/BAO/EntityTag.php

index 3aea6ff02cbef4b44583dc31d41a700197e86294..ed514f759ae9f6c7aa821353cb8ecb16254697e9 100644 (file)
@@ -124,13 +124,11 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag {
   static function del(&$params) {
     $entityTag = new CRM_Core_BAO_EntityTag();
     $entityTag->copyValues($params);
-    if ($entityTag->find(TRUE)) {
-      $entityTag->delete();
+    $entityTag->delete();
 
-      //invoke post hook on entityTag
-      $object = array(0 => array(0 => $params['entity_id']), 1 => $params['entity_table']);
-      CRM_Utils_Hook::post('delete', 'EntityTag', $params['tag_id'], $object);
-    }
+    //invoke post hook on entityTag
+    $object = array(0 => array(0 => $params['entity_id']), 1 => $params['entity_table']);
+    CRM_Utils_Hook::post('delete', 'EntityTag', $params['tag_id'], $object);
   }
 
   /**