From: yashodha Date: Thu, 23 Jun 2016 10:18:11 +0000 (+0530) Subject: CRM-18984 : Can't delete an import/export mapping X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=39a3d35f8e4bb44731b45d7b970da6cb673bc9f7;p=civicrm-core.git CRM-18984 : Can't delete an import/export mapping ---------------------------------------- * CRM-18984: Can't delete an import/export mapping https://issues.civicrm.org/jira/browse/CRM-18984 --- diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index 3c8494b642..dac37cd33e 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -72,10 +72,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { // delete from mapping_field table $mappingField = new CRM_Core_DAO_MappingField(); $mappingField->mapping_id = $id; - $mappingField->find(); - while ($mappingField->fetch()) { - $mappingField->delete(); - } + $mappingField->delete(); // delete from mapping table $mapping = new CRM_Core_DAO_Mapping();