From 562064b639d9ae8a0cba39914924be7f44ee3805 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 16 Jul 2023 11:17:28 +1200 Subject: [PATCH] Fold private setGroupTree function back into caller --- CRM/Custom/Form/CustomDataByType.php | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/CRM/Custom/Form/CustomDataByType.php b/CRM/Custom/Form/CustomDataByType.php index 74c94d9cd0..268534479a 100644 --- a/CRM/Custom/Form/CustomDataByType.php +++ b/CRM/Custom/Form/CustomDataByType.php @@ -48,25 +48,6 @@ class CRM_Custom_Form_CustomDataByType extends CRM_Core_Form { if (array_key_exists($this->_type, $contactTypes)) { $this->assign('contactId', $this->_entityId); } - $this->setGroupTree($this, $subType, $groupID, $onlySubType); - - $this->assign('suppressForm', TRUE); - $this->controller->_generateQFKey = FALSE; - } - - /** - * Add the group data as a formatted array to the form. - * - * This was split off from a shared function. - * - * @param self $form - * @param string $subType - * @param int $gid - * @param bool $onlySubType - * - * @throws \CRM_Core_Exception - */ - private function setGroupTree(&$form, $subType, $gid, $onlySubType = NULL) { $singleRecord = NULL; if (!empty($form->_groupCount) && !empty($form->_multiRecordDisplay) && $form->_multiRecordDisplay == 'single') { $singleRecord = $form->_groupCount; @@ -81,7 +62,7 @@ class CRM_Custom_Form_CustomDataByType extends CRM_Core_Form { $groupTree = CRM_Core_BAO_CustomGroup::getTree($form->_type, NULL, $form->_entityId, - $gid, + $groupID, $subType, $form->_subName, TRUE, @@ -106,6 +87,9 @@ class CRM_Custom_Form_CustomDataByType extends CRM_Core_Form { else { $form->_groupTree = $groupTree; } + + $this->assign('suppressForm', TRUE); + $this->controller->_generateQFKey = FALSE; } /** -- 2.25.1