+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
*/
/**
);
$groupTypes = CRM_Core_OptionGroup::values('group_type', TRUE);
- $config = CRM_Core_Config::singleton();
+
if (isset($this->_id) && !empty($this->_groupValues['saved_search_id'])) {
unset($groupTypes['Access Control']);
}
$params['is_reserved'] = CRM_Utils_Array::value('is_reserved', $params, FALSE);
- $customFields = CRM_Core_BAO_CustomField::getFields('Group');
+ $groupTypeIds = array();
+ $groupType = CRM_Utils_Array::value('group_type', $params);
+ if (is_array($groupType)) {
+ foreach ($groupType as $type => $selected) {
+ if ($selected) {
+ $groupTypeIds[] = $type;
+ }
+ }
+ }
+ $params['group_type'] = $groupTypeIds;
+
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$this->_id,
'Group'