$ufGroups = civicrm_api3('UFGroup', 'get', array(
'sequential' => 1,
'is_active' => 1,
- 'rowCount' => 1000, // FIXME
+ 'options' => array('limit' => 0),
));
+ //CRM-16915 - insert 'module' param for the profile used by CiviEvent.
if (CRM_Core_Permission::check('manage event profiles') && !CRM_Core_Permission::check('administer CiviCRM')) {
foreach ($ufGroups['values'] as $key => $value) {
$ufJoin = CRM_Core_BAO_UFGroup::getUFJoinRecord($value['id']);
if (options.groupTypeFilter) {
matchingUfGroups = ufGroupCollection.subcollection({
filter: function(ufGroupModel) {
- if(!$.isEmptyObject(options.usedByFilter)) {
+ //CRM-16915 - filter with module used by the profile
+ if (!$.isEmptyObject(options.usedByFilter)) {
usedByFilter = options.usedByFilter;
}
return ufGroupModel.checkGroupType(options.groupTypeFilter, options.allowAllSubtypes, usedByFilter);
}
});
+ // CRM-16915 - filter with usedBy module if specified.
if (usedByFilter && this.get('module') != usedByFilter) {
allMatched = false;
}
-
//CRM-15427 allow all subtypes
if (!$.isEmptyObject(validTypes.subTypes) && !allowAllSubtypes) {
// Every actual.subType is a valid.subType