From 9d5dc965647dedd73f51fe5716c0a748d23e2194 Mon Sep 17 00:00:00 2001 From: Jaap Jansma Date: Fri, 13 Jul 2018 09:33:10 +0000 Subject: [PATCH] Fixed #141: only check if name exists. --- CRM/Custom/Form/Group.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Custom/Form/Group.php b/CRM/Custom/Form/Group.php index 90b6947adb..6139759f17 100644 --- a/CRM/Custom/Form/Group.php +++ b/CRM/Custom/Form/Group.php @@ -115,11 +115,10 @@ class CRM_Custom_Form_Group extends CRM_Core_Form { //validate group title as well as name. $title = $fields['title']; $name = CRM_Utils_String::munge($title, '_', 64); - $query = 'select count(*) from civicrm_custom_group where ( name like %1 OR title like %2 ) and id != %3'; + $query = 'select count(*) from civicrm_custom_group where ( name like %1) and id != %2'; $grpCnt = CRM_Core_DAO::singleValueQuery($query, array( 1 => array($name, 'String'), - 2 => array($title, 'String'), - 3 => array((int) $self->_id, 'Integer'), + 2 => array((int) $self->_id, 'Integer'), )); if ($grpCnt) { $errors['title'] = ts('Custom group \'%1\' already exists in Database.', array(1 => $title)); -- 2.25.1