CRM-18194 - Bug fix for group type set to empty while updating Group
authorUjjwal Wahi <w.ujjwal@gmail.com>
Wed, 9 Mar 2016 12:04:13 +0000 (17:34 +0530)
committerUjjwal Wahi <w.ujjwal@gmail.com>
Wed, 9 Mar 2016 20:13:49 +0000 (01:43 +0530)
----------------------------------------
* CRM-18194: Group Type is set to empty while updating Group
  https://issues.civicrm.org/jira/browse/CRM-18194

CRM/Contact/BAO/Group.php
CRM/Group/Form/Edit.php

index ec663c404b0a36e08728651113d37977d356587e..afa89e2b6e51a63975ee65c091d46abfa2566fa6 100644 (file)
@@ -368,7 +368,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
       }
     }
     else {
-      $params['group_type'] = '';
+      $params['group_type'] = NULL;
     }
 
     $session = CRM_Core_Session::singleton();
index 7def4f7ab9723cb9ee12487ec24929ef1169cd23..ad97550ff89e15c265024229848d6c1164fe63ab 100644 (file)
@@ -384,6 +384,7 @@ WHERE  title = %1
       }
 
       $params['is_reserved'] = CRM_Utils_Array::value('is_reserved', $params, FALSE);
+      $params['group_type'] = CRM_Utils_Array::value('group_type', $params, array());
 
       $customFields = CRM_Core_BAO_CustomField::getFields('Group');
       $params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,