CRM-19929: also add pre hook for delete
authorKurund Jalmi <kurund@yahoo.com>
Wed, 25 Jan 2017 13:09:43 +0000 (18:39 +0530)
committerKurund Jalmi <kurund@yahoo.com>
Wed, 25 Jan 2017 13:09:43 +0000 (18:39 +0530)
CRM/Core/BAO/EntityTag.php

index 0a25446638044857333821ab38d1ab978463947e..f4b9921ab4bc34a09568995feb46320ce9b30f73 100644 (file)
@@ -228,6 +228,10 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag {
     $numEntitiesNotRemoved = 0;
     $entityIdsRemoved = array();
 
+    //invoke pre hook for entityTag
+    $preObject = array($entityIds, $entityTable);
+    CRM_Utils_Hook::pre('delete', 'EntityTag', $tagId, $preObject);
+
     foreach ($entityIds as $entityId) {
       // CRM-17350 - check if we have permission to edit the contact
       // that this tag belongs to.