Skip to content

Commit

Permalink
CRM-20091 - Specify return params from getTree
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Jun 2, 2017
1 parent 2487198 commit 73fd446
Show file tree
Hide file tree
Showing 31 changed files with 114 additions and 64 deletions.
2 changes: 1 addition & 1 deletion CRM/Activity/Form/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public function preProcess() {

if ($this->_action & CRM_Core_Action::VIEW) {
// Get the tree of custom fields.
$this->_groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', $this,
$this->_groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', NULL,
$this->_activityId, 0, $this->_activityTypeId
);
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Case/Form/CaseView.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function preProcess() {
$entitySubType = !empty($values['case_type_id']) ? $values['case_type_id'] : NULL;
$this->assign('caseTypeID', $entitySubType);
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Case',
$this,
NULL,
$this->_caseID,
NULL,
$entitySubType
Expand Down
2 changes: 1 addition & 1 deletion CRM/Case/Form/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function preProcess() {
$this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);

$groupTree = CRM_Core_BAO_CustomGroup::getTree('Case',
$this,
NULL,
$this->_entityID,
$this->_groupID,
$this->_subTypeID
Expand Down
6 changes: 3 additions & 3 deletions CRM/Contact/Form/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function setDefaultValues() {
if ($this->_copyValueId) {
// cached tree is fetched
$groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_type,
$this,
NULL,
$this->_entityId,
$this->_groupID,
array(),
Expand Down Expand Up @@ -261,15 +261,15 @@ public function setDefaultValues() {
}

$groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_contactType,
$this,
NULL,
$this->_tableID,
$this->_groupID,
$this->_contactSubType
);

if (empty($_POST['hidden_custom_group_count'])) {
// custom data building in edit mode (required to handle multi-value)
$groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_contactType, $this, $this->_tableID,
$groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_contactType, NULL, $this->_tableID,
$this->_groupID, $this->_contactSubType
);
$customValueCount = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, TRUE, $this->_groupID, NULL, NULL, $this->_tableID);
Expand Down
5 changes: 1 addition & 4 deletions CRM/Contact/Form/Edit/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,7 @@ public static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharin
$form->assign('geoCode', $geoCode);

// Process any address custom data -
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Address',
$form,
$entityId
);
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Address', NULL, $entityId);

if (isset($groupTree) && is_array($groupTree)) {
// use simplified formatted groupTree
Expand Down
5 changes: 1 addition & 4 deletions CRM/Contact/Form/Search/Custom/MultipleValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ class CRM_Contact_Form_Search_Custom_MultipleValues extends CRM_Contact_Form_Sea
public function __construct(&$formValues) {
parent::__construct($formValues);

$this->_groupTree = CRM_Core_BAO_CustomGroup::getTree("'Contact', 'Individual', 'Organization', 'Household'",
CRM_Core_DAO::$_nullObject,
NULL, -1
);
$this->_groupTree = CRM_Core_BAO_CustomGroup::getTree("'Contact', 'Individual', 'Organization', 'Household'", NULL, NULL, -1);

$this->_group = CRM_Utils_Array::value('group', $this->_formValues);

Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/Import/Parser/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ public function formatParams(&$params, $onDuplicate, $cid) {
$modeFill = TRUE;
}

$groupTree = CRM_Core_BAO_CustomGroup::getTree($params['contact_type'], CRM_Core_DAO::$_nullObject, $cid, 0, NULL);
$groupTree = CRM_Core_BAO_CustomGroup::getTree($params['contact_type'], NULL, $cid, 0, NULL);
CRM_Core_BAO_CustomGroup::setDefaults($groupTree, $defaults, FALSE, FALSE);

$locationFields = array(
Expand Down
4 changes: 1 addition & 3 deletions CRM/Contact/Page/Inline/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ public function run() {
}

// add custom data of type address
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Address',
$this, $idValue
);
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Address', NULL, $idValue);

// we setting the prefix to dnc_ below so that we don't overwrite smarty's grouptree var.
$currentAddressBlock['address'][$locBlockNo]['custom'] = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, "dnc_");
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/Page/Inline/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function run() {
//custom groups Inline
$entityType = CRM_Contact_BAO_Contact::getContactType($contactId);
$entitySubType = CRM_Contact_BAO_Contact::getContactSubType($contactId);
$groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $contactId,
$groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType, NULL, $contactId,
$cgId, $entitySubType
);
$details = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $contactId);
Expand Down
4 changes: 2 additions & 2 deletions CRM/Contact/Page/View/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function run() {
if ($this->_multiRecordDisplay == 'single') {
$groupTitle = CRM_Core_BAO_CustomGroup::getTitle($this->_groupId);
CRM_Utils_System::setTitle(ts('View %1 Record', array(1 => $groupTitle)));
$groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $this->_contactId,
$groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType, NULL, $this->_contactId,
$this->_groupId, $entitySubType, NULL, TRUE, NULL, FALSE, TRUE, $this->_cgcount
);

Expand All @@ -149,7 +149,7 @@ public function run() {
$this->assign('skipTitle', 1);
}
else {
$groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $this->_contactId,
$groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType, NULL, $this->_contactId,
$this->_groupId, $entitySubType
);
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contact/Page/View/Relationship.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function view() {
$viewNote = CRM_Core_BAO_Note::getNote($this->_id);
$this->assign('viewNote', $viewNote);

$groupTree = CRM_Core_BAO_CustomGroup::getTree('Relationship', $this, $this->_id, 0, $relType);
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Relationship', NULL, $this->_id, 0, $relType);
CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $this->_id);

$rType = CRM_Utils_Array::value('rtype', $viewRelationship[$this->_id]);
Expand Down
7 changes: 2 additions & 5 deletions CRM/Contact/Page/View/Summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function preProcess() {
);
}
$groupTree = CRM_Core_BAO_CustomGroup::getTree($entityType,
$this,
NULL,
$this->_contactId,
NULL,
$entitySubType
Expand Down Expand Up @@ -182,10 +182,7 @@ public function view() {
$idValue = $blockVal['master_id'];
}
}
$groupTree = CRM_Core_BAO_CustomGroup::getTree(ucfirst($key),
$this,
$idValue
);
$groupTree = CRM_Core_BAO_CustomGroup::getTree(ucfirst($key), NULL, $idValue);
// we setting the prefix to dnc_ below so that we don't overwrite smarty's grouptree var.
$defaults[$key][$blockId]['custom'] = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, "dnc_");
}
Expand Down
6 changes: 3 additions & 3 deletions CRM/Contribute/BAO/Contribution.php
Original file line number Diff line number Diff line change
Expand Up @@ -2747,7 +2747,7 @@ public function _gatherMessageValues($input, &$values, $ids = array()) {

CRM_Event_BAO_Event::retrieve($eventParams, $values['event']);
// add custom fields for event
$eventGroupTree = CRM_Core_BAO_CustomGroup::getTree('Event', $this->_relatedObjects['event'], $this->_relatedObjects['event']->id);
$eventGroupTree = CRM_Core_BAO_CustomGroup::getTree('Event', NULL, $this->_relatedObjects['event']->id);

$eventCustomGroup = array();
foreach ($eventGroupTree as $key => $group) {
Expand Down Expand Up @@ -2775,7 +2775,7 @@ public function _gatherMessageValues($input, &$values, $ids = array()) {

CRM_Event_BAO_Participant::getValues($participantParams, $values['participant'], $participantIds);
// add custom fields for event
$participantGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', $this->_relatedObjects['participant'], $this->_relatedObjects['participant']->id);
$participantGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $this->_relatedObjects['participant']->id);
$participantCustomGroup = array();
foreach ($participantGroupTree as $key => $group) {
if ($key === 'info') {
Expand Down Expand Up @@ -2827,7 +2827,7 @@ public function _gatherMessageValues($input, &$values, $ids = array()) {
}
}

$groupTree = CRM_Core_BAO_CustomGroup::getTree('Contribution', $this, $this->id);
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Contribution', NULL, $this->id);

$customGroup = array();
foreach ($groupTree as $key => $group) {
Expand Down
2 changes: 1 addition & 1 deletion CRM/Contribute/Form/ContributionView.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function preProcess() {
}
}

$groupTree = CRM_Core_BAO_CustomGroup::getTree('Contribution', $this, $id, 0, CRM_Utils_Array::value('financial_type_id', $values));
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Contribution', NULL, $id, 0, CRM_Utils_Array::value('financial_type_id', $values));
CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $id);

$premiumId = NULL;
Expand Down
35 changes: 23 additions & 12 deletions CRM/Core/BAO/CustomGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ public static function autoCreateByActivityType($activityTypeId) {
*
* @param string $entityType
* Of the contact whose contact type is needed.
* @param CRM_Core_Form $deprecated
* Not used.
* @param array $toReturn
* What data should be returned. ['custom_group' => ['id', 'name', etc.], 'custom_field' => ['id', 'label', etc.]]
* @param int $entityID
* @param int $groupID
* @param array $subTypes
Expand All @@ -331,7 +331,7 @@ public static function autoCreateByActivityType($activityTypeId) {
* api - through which it is properly tested - so can be refactored with some comfort.)
*
* @param bool $checkPermission
* @param varchar $singleRecord
* @param string|int $singleRecord
* holds 'new' or id if view/edit/copy form for a single record is being loaded.
* @param bool $showPublicOnly
*
Expand All @@ -349,7 +349,7 @@ public static function autoCreateByActivityType($activityTypeId) {
*/
public static function getTree(
$entityType,
$deprecated = NULL,
$toReturn = array(),
$entityID = NULL,
$groupID = NULL,
$subTypes = array(),
Expand Down Expand Up @@ -381,9 +381,9 @@ public static function getTree(
// create a new tree
$strWhere = $orderBy = '';

// using tableData to build the queryString
// legacy hardcoded list of data to return
$tableData = array(
'civicrm_custom_field' => array(
'custom_field' => array(
'id',
'name',
'label',
Expand All @@ -404,7 +404,7 @@ public static function getTree(
'option_group_id',
'in_selector',
),
'civicrm_custom_group' => array(
'custom_group' => array(
'id',
'name',
'table_name',
Expand All @@ -421,13 +421,24 @@ public static function getTree(
'is_public',
),
);
if (!$toReturn || !is_array($toReturn)) {
$toReturn = $tableData;
}
else {
$toReturn = array_filter($toReturn) + $tableData;
// Merge in required fields that we must have
$toReturn['custom_field'] = array_unique(array_merge($toReturn['custom_field'], array('id', 'column_name', 'data_type')));
$toReturn['custom_group'] = array_unique(array_merge($toReturn['custom_group'], array('id', 'is_multiple', 'table_name', 'name')));
// Validate return fields
$toReturn['custom_field'] = array_intersect($toReturn['custom_field'], array_keys(CRM_Core_DAO_CustomField::fieldKeys()));
$toReturn['custom_group'] = array_intersect($toReturn['custom_group'], array_keys(CRM_Core_DAO_CustomGroup::fieldKeys()));
}

// create select
$select = array();
foreach ($tableData as $tableName => $tableColumn) {
foreach ($toReturn as $tableName => $tableColumn) {
foreach ($tableColumn as $columnName) {
$alias = $tableName . "_" . $columnName;
$select[] = "{$tableName}.{$columnName} as {$tableName}_{$columnName}";
$select[] = "civicrm_{$tableName}.{$columnName} as civicrm_{$tableName}_{$columnName}";
}
}
$strSelect = "SELECT " . implode(', ', $select);
Expand Down Expand Up @@ -552,7 +563,7 @@ public static function getTree(
$groupTree[$groupID]['id'] = $groupID;

// populate the group information
foreach ($tableData['civicrm_custom_group'] as $fieldName) {
foreach ($toReturn['custom_group'] as $fieldName) {
$fullFieldName = "civicrm_custom_group_$fieldName";
if ($fieldName == 'id' ||
is_null($crmDAO->$fullFieldName)
Expand Down Expand Up @@ -581,7 +592,7 @@ public static function getTree(
$customValueTables[$crmDAO->civicrm_custom_group_table_name][$crmDAO->civicrm_custom_field_column_name] = 1;
$groupTree[$groupID]['fields'][$fieldId]['id'] = $fieldId;
// populate information for a custom field
foreach ($tableData['civicrm_custom_field'] as $fieldName) {
foreach ($toReturn['custom_field'] as $fieldName) {
$fullFieldName = "civicrm_custom_field_$fieldName";
if ($fieldName == 'id' ||
is_null($crmDAO->$fullFieldName)
Expand Down
2 changes: 1 addition & 1 deletion CRM/Core/BAO/UFGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -3237,7 +3237,7 @@ public static function setComponentDefaults(&$fields, $componentId, $component,
//get the groupTree as per subTypes.
$groupTree = array();
foreach ($componentSubType as $subType) {
$subTree = CRM_Core_BAO_CustomGroup::getTree($componentBAOName, CRM_Core_DAO::$_nullObject,
$subTree = CRM_Core_BAO_CustomGroup::getTree($componentBAOName, NULL,
$componentId, 0, $values[$subType]
);
$groupTree = CRM_Utils_Array::crmArrayMerge($groupTree, $subTree);
Expand Down
2 changes: 1 addition & 1 deletion CRM/Custom/Form/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public static function setGroupTree(&$form, $subType, $gid, $onlySubType = NULL,
}

$groupTree = CRM_Core_BAO_CustomGroup::getTree($form->_type,
$form,
NULL,
$form->_entityId,
$gid,
$subType,
Expand Down
2 changes: 1 addition & 1 deletion CRM/Dedupe/BAO/RuleGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static function &supportedFields($requestedType) {
}
}
// add custom data fields
foreach (CRM_Core_BAO_CustomGroup::getTree($ctype, CRM_Core_DAO::$_nullObject, NULL, -1) as $key => $cg) {
foreach (CRM_Core_BAO_CustomGroup::getTree($ctype, NULL, NULL, -1) as $key => $cg) {
if (!is_int($key)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Dedupe/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public static function formatParams($fields, $ctype) {
}

// handle custom data
$tree = CRM_Core_BAO_CustomGroup::getTree($ctype, CRM_Core_DAO::$_nullObject, NULL, -1);
$tree = CRM_Core_BAO_CustomGroup::getTree($ctype, NULL, NULL, -1);
CRM_Core_BAO_CustomGroup::postProcess($tree, $fields, TRUE);
foreach ($tree as $key => $cg) {
if (!is_int($key)) {
Expand Down
6 changes: 2 additions & 4 deletions CRM/Dedupe/Merger.php
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ public static function getRowsElementsAndInfo($mainId, $otherId, $checkPermissio
$mainTree = CRM_Core_BAO_CustomGroup::getTree($main['contact_type'], NULL, $mainId, -1,
CRM_Utils_Array::value('contact_sub_type', $main), NULL, TRUE, NULL, TRUE, $checkPermissions
);
$otherTree = CRM_Core_BAO_CustomGroup::getTree($main['contact_type'], CRM_Core_DAO::$_nullObject, $otherId, -1,
$otherTree = CRM_Core_BAO_CustomGroup::getTree($main['contact_type'], NULL, $otherId, -1,
CRM_Utils_Array::value('contact_sub_type', $other), NULL, TRUE, NULL, TRUE, $checkPermissions
);
CRM_Core_DAO::freeResult();
Expand Down Expand Up @@ -1515,9 +1515,7 @@ public static function moveAllBelongings($mainId, $otherId, $migrationInfo, $che
// fix custom fields so they're edible by createProfileContact()
static $treeCache = array();
if (!array_key_exists($migrationInfo['main_details']['contact_type'], $treeCache)) {
$treeCache[$migrationInfo['main_details']['contact_type']] = CRM_Core_BAO_CustomGroup::getTree($migrationInfo['main_details']['contact_type'],
CRM_Core_DAO::$_nullObject, NULL, -1
);
$treeCache[$migrationInfo['main_details']['contact_type']] = CRM_Core_BAO_CustomGroup::getTree($migrationInfo['main_details']['contact_type'], NULL, NULL, -1);
}

$cFields = array();
Expand Down
8 changes: 4 additions & 4 deletions CRM/Event/Form/ParticipantView.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ public function preProcess() {
$finalTree = array();

foreach ($allRoleIDs as $k => $v) {
$roleGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', $this, $participantID, NULL, $v, $roleCustomDataTypeID);
$eventGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', $this, $participantID, NULL,
$roleGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID, NULL, $v, $roleCustomDataTypeID);
$eventGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID, NULL,
$values[$participantID]['event_id'], $eventNameCustomDataTypeID
);
$eventTypeID = CRM_Core_DAO::getFieldValue("CRM_Event_DAO_Event", $values[$participantID]['event_id'], 'event_type_id', 'id');
$eventTypeGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', $this, $participantID, NULL, $eventTypeID, $eventTypeCustomDataTypeID);
$eventTypeGroupTree = CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID, NULL, $eventTypeID, $eventTypeCustomDataTypeID);
$groupTree = CRM_Utils_Array::crmArrayMerge($roleGroupTree, $eventGroupTree);
$groupTree = CRM_Utils_Array::crmArrayMerge($groupTree, $eventTypeGroupTree);
$groupTree = CRM_Utils_Array::crmArrayMerge($groupTree, CRM_Core_BAO_CustomGroup::getTree('Participant', $this, $participantID));
$groupTree = CRM_Utils_Array::crmArrayMerge($groupTree, CRM_Core_BAO_CustomGroup::getTree('Participant', NULL, $participantID));
foreach ($groupTree as $treeId => $trees) {
$finalTree[$treeId] = $trees;
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Event/Form/Registration/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ public function postProcess() {
}

//get event custom field information
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Event', $this, $this->_eventId, 0, $this->_values['event']['event_type_id']);
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Event', NULL, $this->_eventId, 0, $this->_values['event']['event_type_id']);
$primaryParticipant['eventCustomFields'] = $groupTree;

// call postprocess hook before leaving
Expand Down
2 changes: 1 addition & 1 deletion CRM/Event/Page/EventInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function run() {
}

//retrieve custom field information
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Event', $this, $this->_id, 0, $values['event']['event_type_id'], NULL, TRUE, NULL, FALSE, TRUE, NULL, TRUE);
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Event', NULL, $this->_id, 0, $values['event']['event_type_id'], NULL, TRUE, NULL, FALSE, TRUE, NULL, TRUE);
CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $this->_id);
$this->assign('action', CRM_Core_Action::VIEW);
//To show the event location on maps directly on event info page
Expand Down
2 changes: 1 addition & 1 deletion CRM/Grant/Form/GrantView.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function preProcess() {
$this->assign('attachment', $attachment);

$grantType = CRM_Core_DAO::getFieldValue("CRM_Grant_DAO_Grant", $this->_id, "grant_type_id");
$groupTree = CRM_Core_BAO_CustomGroup::getTree("Grant", $this, $this->_id, 0, $grantType);
$groupTree = CRM_Core_BAO_CustomGroup::getTree("Grant", NULL, $this->_id, 0, $grantType);
CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $this->_id);

$this->assign('id', $this->_id);
Expand Down
2 changes: 1 addition & 1 deletion CRM/Member/Form/MembershipRenewal.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ protected function submit() {
$this->_params['paidBy'] = $paymentInstrument[$this->_params['payment_instrument_id']];
}
//get the group Tree
$this->_groupTree = CRM_Core_BAO_CustomGroup::getTree('Membership', $this, $this->_id, FALSE, $this->_memType);
$this->_groupTree = CRM_Core_BAO_CustomGroup::getTree('Membership', NULL, $this->_id, FALSE, $this->_memType);

// retrieve custom data
$customFields = $customValues = $fo = array();
Expand Down
Loading

0 comments on commit 73fd446

Please sign in to comment.