$params['limit_listings_group_id'] = CRM_Utils_Array::value('group', $params);
$params['add_to_group_id'] = CRM_Utils_Array::value('add_contact_to_group', $params);
+ //CRM-15427
+ if (!empty($params['group_type']) && is_array($params['group_type'])) {
+ $params['group_type'] = implode(',', $params['group_type']);
+ }
$ufGroup = new CRM_Core_DAO_UFGroup();
$ufGroup->copyValues($params);
$configs['allowCoreTypes'][] = 'Individual';
$configs['allowCoreTypes'][] = 'Participant';
//CRM-15427
- $participantEventType = CRM_Core_DAO::getFieldValue("CRM_Event_DAO_Event", $_GET['id'], 'event_type_id', 'id');
- $participantRole = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $_GET['id'], 'default_role_id');
- $configs['allowSubTypes']['ParticipantEventName'] = array($_GET['id']);
- $configs['allowSubTypes']['ParticipantEventType'] = array($participantEventType);
- $configs['allowSubTypes']['ParticipantRole'] = array($participantRole);
-
+ if (!empty($_GET['id']) && is_numeric($_GET['id'])) {
+ $participantEventType = CRM_Core_DAO::getFieldValue("CRM_Event_DAO_Event", $_GET['id'], 'event_type_id', 'id');
+ $participantRole = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $_GET['id'], 'default_role_id');
+ $configs['allowSubTypes']['ParticipantEventName'] = array($_GET['id']);
+ $configs['allowSubTypes']['ParticipantEventType'] = array($participantEventType);
+ $configs['allowSubTypes']['ParticipantRole'] = array($participantRole);
+ }
$configs['profileEntities'][] = array('entity_name' => 'contact_1', 'entity_type' => 'IndividualModel');
$configs['profileEntities'][] = array('entity_name' => 'participant_1', 'entity_type' => 'ParticipantModel', 'entity_sub_type' => '*');
* @return {Boolean}
*/
//CRM-15427
- checkGroupType: function(validTypesExpr, allowAllSubtypes = false) {
+ checkGroupType: function(validTypesExpr, allowAllSubtypes) {
var allMatched = true;
+ allowAllSubtypes = allowAllSubtypes || false;
if (! this.get('group_type') || this.get('group_type') == '') {
return true;
}