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=4d4daa2dc4c0a5b16ff6572a111af722e0e4909b;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 --- diff --git a/CRM/UF/Page/Group.php b/CRM/UF/Page/Group.php index 273dfab8fa..932580fb49 100644 --- a/CRM/UF/Page/Group.php +++ b/CRM/UF/Page/Group.php @@ -351,8 +351,10 @@ class CRM_UF_Page_Group extends CRM_Core_Page { $groupTypes = self::extractGroupTypes($value['group_type']); // drop Create, Edit and View mode links if profile group_type is one of the following: - $groupComponents = array('Contribution', 'Membership', 'Activity', 'Participant', 'Case'); - $componentFound = array_intersect($groupComponents, array_keys($groupTypes)); + // 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; }