From d9316a8e7b950b0d7f7eff7248d1bd234a8e2f16 Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Fri, 9 Jan 2015 13:57:26 +0530 Subject: [PATCH] CRM-15787 - QA Fix ---------------------------------------- * CRM-15787: Not possible to add contribution field in profile for on behalf membership https://issues.civicrm.org/jira/browse/CRM-15787 --- CRM/Contribute/Form/ContributionPage/Settings.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Contribute/Form/ContributionPage/Settings.php b/CRM/Contribute/Form/ContributionPage/Settings.php index 8a8fa5f8f0..b20f5f2f5f 100644 --- a/CRM/Contribute/Form/ContributionPage/Settings.php +++ b/CRM/Contribute/Form/ContributionPage/Settings.php @@ -146,7 +146,7 @@ class CRM_Contribute_Form_ContributionPage_Settings extends CRM_Contribute_Form_ //CRM-15787 - If applicable, register 'membership_1' $member = CRM_Member_BAO_Membership::getMembershipBlock($this->_id); - $allowMemberCoreTypes = ''; + $coreTypes = array('Contact', 'Organization'); $entities[] = array( 'entity_name' => array ('contact_1'), @@ -154,13 +154,13 @@ class CRM_Contribute_Form_ContributionPage_Settings extends CRM_Contribute_Form_ ); if ($member && $member['is_active']) { - $allowMemberCoreTypes = 'Membership'; + $coreTypes[] = 'Membership'; $entities[] = array( 'entity_name' => array ('membership_1'), 'entity_type' => 'MembershipModel', ); } - $allowCoreTypes = array_merge(array('Contact', 'Organization', $allowMemberCoreTypes), CRM_Contact_BAO_ContactType::subTypes('Organization')); + $allowCoreTypes = array_merge($coreTypes, CRM_Contact_BAO_ContactType::subTypes('Organization')); $allowSubTypes = array(); $this->addProfileSelector('onbehalf_profile_id', ts('Organization Profile'), $allowCoreTypes, $allowSubTypes, $entities); -- 2.25.1