Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #163 from JMAConsulting/custom-field-fix
Browse files Browse the repository at this point in the history
Fix to retrieve fields more consistently
  • Loading branch information
seamuslee001 authored Aug 3, 2020
2 parents 58a82cf + 5ac1953 commit dfc3e99
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions CRM/Grant/Form/GrantBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,9 @@ public function buildCustom($id, $name, $viewOnly = FALSE, $profileContactType =
'financial_type_id' => 1,
);

$fields = NULL;
if ($contactID && CRM_Core_BAO_UFGroup::filterUFGroups($id, $contactID)) {
$fields = CRM_Core_BAO_UFGroup::getFields($id, FALSE, CRM_Core_Action::ADD, NULL, NULL, FALSE,
NULL, FALSE, NULL, CRM_Core_Permission::CREATE, NULL
);
}
else {
$fields = self::getFields($id, FALSE, CRM_Core_Action::ADD, NULL, NULL, FALSE,
NULL, FALSE, NULL, CRM_Core_Permission::CREATE, NULL
);
}
$fields = self::getFields($id, FALSE, CRM_Core_Action::ADD, NULL, NULL, FALSE,
NULL, FALSE, NULL, CRM_Core_Permission::CREATE, NULL
);

if ($fields) {
// determine if email exists in profile so we know if we need to manually insert CRM-2888, CRM-15067
Expand Down

0 comments on commit dfc3e99

Please sign in to comment.