From e51af626b20366667bbc269648e40c86451aac23 Mon Sep 17 00:00:00 2001 From: Graylin Kim Date: Sat, 14 Dec 2013 21:15:38 -0500 Subject: [PATCH] Fixes CRM-13979 by moving the status update out of the BAO layer. --- CRM/Admin/Form/Tag.php | 2 ++ CRM/Core/BAO/Tag.php | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Admin/Form/Tag.php b/CRM/Admin/Form/Tag.php index be6b438887..b8ca3ba08d 100644 --- a/CRM/Admin/Form/Tag.php +++ b/CRM/Admin/Form/Tag.php @@ -166,7 +166,9 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form { if ($this->_action == CRM_Core_Action::DELETE) { if ($this->_id > 0) { + $tag = civicrm_api3('tag', 'getsingle', array('id' => $this->_id)); CRM_Core_BAO_Tag::del($this->_id); + CRM_Core_Session::setStatus(ts('The tag \'%1\' has been deleted.', array(1 => $tag->name)), ts('Deleted'), 'success'); } } else { diff --git a/CRM/Core/BAO/Tag.php b/CRM/Core/BAO/Tag.php index ddd639cb04..3689539a98 100644 --- a/CRM/Core/BAO/Tag.php +++ b/CRM/Core/BAO/Tag.php @@ -286,7 +286,6 @@ class CRM_Core_BAO_Tag extends CRM_Core_DAO_Tag { if ($tag->delete()) { CRM_Utils_Hook::post('delete', 'Tag', $id, $tag); - CRM_Core_Session::setStatus(ts('Selected tag has been deleted successfuly.'), ts('Tag Deleted'), 'success'); return TRUE; } return FALSE; -- 2.25.1