From 1ca4999ca39fbac8191b73c2753b6ca795ad0480 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 22 Jun 2018 15:35:09 +0100 Subject: [PATCH] dev/core/issues/203, removed cruft code --- CRM/Core/BAO/OptionGroup.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CRM/Core/BAO/OptionGroup.php b/CRM/Core/BAO/OptionGroup.php index 85b2e5203de0..fdc415b5cab5 100644 --- a/CRM/Core/BAO/OptionGroup.php +++ b/CRM/Core/BAO/OptionGroup.php @@ -93,17 +93,11 @@ public static function add(&$params, $ids = array()) { } $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE); - $params['is_default'] = CRM_Utils_Array::value('is_default', $params, FALSE); // action is taken depending upon the mode $optionGroup = new CRM_Core_DAO_OptionGroup(); $optionGroup->copyValues($params);; - if ($params['is_default']) { - $query = "UPDATE civicrm_option_group SET is_default = 0"; - CRM_Core_DAO::executeQuery($query); - } - $optionGroup->save(); return $optionGroup; }