From: Pradeep Nayak Date: Thu, 10 Mar 2016 13:48:52 +0000 (+0530) Subject: CRM-18204, used contact type and contact sub type for checking uf group type X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7eec7312986b282ca5532567d7bb139a188d54ad;p=civicrm-core.git CRM-18204, used contact type and contact sub type for checking uf group type ---------------------------------------- * CRM-18204: Enables use of Mixed Profile for create mode https://issues.civicrm.org/jira/browse/CRM-18204 Conflicts: CRM/UF/Page/Group.php --- diff --git a/CRM/UF/Page/Group.php b/CRM/UF/Page/Group.php index 4d0fdf7179..914622fc2c 100644 --- a/CRM/UF/Page/Group.php +++ b/CRM/UF/Page/Group.php @@ -342,10 +342,12 @@ class CRM_UF_Page_Group extends CRM_Core_Page { } $groupTypes = self::extractGroupTypes($value['group_type']); - $groupComponents = array('Contribution', 'Membership', 'Activity', 'Participant', 'Case'); - // drop Create, Edit and View mode links if profile group_type is Contribution, Membership, Activities or Participant - $componentFound = array_intersect($groupComponents, array_keys($groupTypes)); + // drop Create, Edit and View mode links if profile group_type is one of the following: + // Contribution, Membership, Activity, Participant, Case, Grant + $contactTypes = CRM_Contact_BAO_ContactType::contactTypes(); + $contactTypes[] = 'Contact'; + $componentFound = array_diff(array_keys($groupTypes), $contactTypes); if (!empty($componentFound)) { $action -= CRM_Core_Action::ADD; }