From 38223007d81177943297d7d2e45d9b018a14f47d Mon Sep 17 00:00:00 2001 From: kurund Date: Thu, 9 Jan 2014 12:17:02 -0800 Subject: [PATCH] delete tags that belongs to tagset, CRM-14052 ---------------------------------------- * CRM-14052: Tagset fixes http://issues.civicrm.org/jira/browse/CRM-14052 --- CRM/Core/Form/Tag.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Form/Tag.php b/CRM/Core/Form/Tag.php index 4d1a454d00..53b040e134 100644 --- a/CRM/Core/Form/Tag.php +++ b/CRM/Core/Form/Tag.php @@ -304,9 +304,9 @@ class CRM_Core_Form_Tag { } $deleteSQL = " -DELETE FROM civicrm_entity_tag USING civicrm_entity_tag, civicrm_tag -WHERE civicrm_entity_tag.tag_id = civicrm_tag.id AND civicrm_tag.parent_id IS NOT NULL -AND civicrm_entity_tag.entity_id={$entityId} AND civicrm_entity_tag.entity_table='{$entityTable}' {$inClause}"; +DELETE FROM civicrm_entity_tag USING civicrm_entity_tag, civicrm_tag ct1, civicrm_tag ct2 +WHERE civicrm_entity_tag.tag_id = ct1.id AND ct1.parent_id IS NOT NULL AND civicrm_entity_tag.entity_id={$entityId} +AND civicrm_entity_tag.entity_table='{$entityTable}' AND ct1.parent_id = ct2.id AND ct2.is_tagset=1 {$inClause}"; CRM_Core_DAO::executeQuery($deleteSQL); } } -- 2.25.1