CRM-18591: support for single value passed through api
authoryashodha <yashodha.chaku@webaccessglobal.com>
Wed, 20 Jul 2016 12:16:50 +0000 (17:46 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 22 Jul 2016 07:23:15 +0000 (12:53 +0530)
----------------------------------------
* CRM-18591: group_type parameter ignored when using API to create group
  https://issues.civicrm.org/jira/browse/CRM-18591

CRM/Contact/BAO/Group.php

index 58a68060efb85331862773c6e023aa0e8cbdfafd..cf6483eba9aa0edcdc9de0beb02cee7434ace802 100644 (file)
@@ -368,6 +368,9 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
             $params['group_type']
           ) . CRM_Core_DAO::VALUE_SEPARATOR;
       }
+      else {
+        $params['group_type'] = CRM_Core_DAO::VALUE_SEPARATOR . $params['group_type'] . CRM_Core_DAO::VALUE_SEPARATOR;
+      }
     }
     else {
       $params['group_type'] = NULL;