Skip to content

Commit

Permalink
Post unshare cleanup
Browse files Browse the repository at this point in the history
This stops passing & returning unused values from the previously shared function
& removes a deprecated chunk.

This deprecation was very precautionary IMHO so 6 months is long enough
  • Loading branch information
eileenmcnaughton committed Jul 15, 2023
1 parent 47f5516 commit e4dfc16
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions CRM/Custom/Form/CustomDataByType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ public function preProcess() {
if (array_key_exists($this->_type, $contactTypes)) {
$this->assign('contactId', $this->_entityId);
}
if (!is_array($this->_subType) && strstr($this->_subType ?? '', CRM_Core_DAO::VALUE_SEPARATOR)) {
CRM_Core_Error::deprecatedWarning('Using a CRM_Core_DAO::VALUE_SEPARATOR separated subType on civicrm/custom route is deprecated, use a comma-separated string instead.');
$this->_subType = str_replace(CRM_Core_DAO::VALUE_SEPARATOR, ',', trim($this->_subType, CRM_Core_DAO::VALUE_SEPARATOR));
}
$this->setGroupTree($this, $this->_subType, $this->_groupID, $this->_onlySubtype);

$this->assign('suppressForm', TRUE);
Expand All @@ -67,12 +63,10 @@ public function preProcess() {
* @param string $subType
* @param int $gid
* @param bool $onlySubType
* @param bool $getCachedTree
*
* @return array
* @throws \CRM_Core_Exception
*/
private function setGroupTree(&$form, $subType, $gid, $onlySubType = NULL, $getCachedTree = TRUE) {
private function setGroupTree(&$form, $subType, $gid, $onlySubType = NULL) {
$singleRecord = NULL;
if (!empty($form->_groupCount) && !empty($form->_multiRecordDisplay) && $form->_multiRecordDisplay == 'single') {
$singleRecord = $form->_groupCount;
Expand All @@ -90,7 +84,7 @@ private function setGroupTree(&$form, $subType, $gid, $onlySubType = NULL, $getC
$gid,
$subType,
$form->_subName,
$getCachedTree,
TRUE,
$onlySubType,
FALSE,
CRM_Core_Permission::EDIT,
Expand All @@ -108,11 +102,9 @@ private function setGroupTree(&$form, $subType, $gid, $onlySubType = NULL, $getC
foreach ($keys as $key) {
$form->_groupTree[$key] = $groupTree[$key];
}
return [$form, $groupTree];
}
else {
$form->_groupTree = $groupTree;
return [$form, $groupTree];
}
}

Expand Down

0 comments on commit e4dfc16

Please sign in to comment.