Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow up fix (master only regression) #26851

Merged
merged 1 commit into from
Jul 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Follow up fix
eileenmcnaughton committed Jul 16, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 2614e03fb9b5becf1b2b3b308bd2076e29451c07
16 changes: 8 additions & 8 deletions CRM/Custom/Form/CustomDataByType.php
Original file line number Diff line number Diff line change
@@ -58,9 +58,9 @@ public function preProcess() {
$singleRecord = 'new';
}

$groupTree = CRM_Core_BAO_CustomGroup::getTree($form->_type,
$groupTree = CRM_Core_BAO_CustomGroup::getTree(CRM_Utils_Request::retrieve('type', 'String'),
NULL,
$form->_entityId,
CRM_Utils_Request::retrieve('entityID', 'Positive'),
$groupID,
$subType,
CRM_Utils_Request::retrieve('subName', 'String'),
@@ -71,20 +71,20 @@ public function preProcess() {
$singleRecord
);

if (property_exists($form, '_customValueCount') && !empty($groupTree)) {
$form->_customValueCount = CRM_Core_BAO_CustomGroup::buildCustomDataView($form, $groupTree, TRUE, NULL, NULL, NULL, $form->_entityId);
if (property_exists($this, '_customValueCount') && !empty($groupTree)) {
$this->_customValueCount = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, TRUE, NULL, NULL, NULL, $this->_entityId);
}
// we should use simplified formatted groupTree
$groupTree = CRM_Core_BAO_CustomGroup::formatGroupTree($groupTree, $form->_groupCount, $form);
$groupTree = CRM_Core_BAO_CustomGroup::formatGroupTree($groupTree, $this->_groupCount, $this);

if (isset($form->_groupTree) && is_array($form->_groupTree)) {
if (isset($this->_groupTree) && is_array($this->_groupTree)) {
$keys = array_keys($groupTree);
foreach ($keys as $key) {
$form->_groupTree[$key] = $groupTree[$key];
$this->_groupTree[$key] = $groupTree[$key];
}
}
else {
$form->_groupTree = $groupTree;
$this->_groupTree = $groupTree;
}

$this->assign('suppressForm', TRUE);