From 52aaeb59aa2fd16e11eb198f7262ececf689dd29 Mon Sep 17 00:00:00 2001 From: Samuel Vanhove Date: Mon, 23 Oct 2023 09:33:13 -0400 Subject: [PATCH] dev/core#4703 remove obsolete code --- CRM/Group/Form/Edit.php | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/CRM/Group/Form/Edit.php b/CRM/Group/Form/Edit.php index ebc9dd8a88..22e419ea14 100644 --- a/CRM/Group/Form/Edit.php +++ b/CRM/Group/Form/Edit.php @@ -256,15 +256,9 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { //build custom data CRM_Custom_Form_CustomData::buildQuickForm($this); - $doParentCheck = FALSE; - if (CRM_Core_Permission::isMultisiteEnabled()) { - $doParentCheck = !($this->_id && CRM_Core_BAO_Domain::isDomainGroup($this->_id)); - } - $options = [ 'selfObj' => $this, 'parentGroups' => $parentGroups, - 'doParentCheck' => $doParentCheck, ]; $this->addFormRule(['CRM_Group_Form_Edit', 'formRule'], $options); } @@ -283,29 +277,8 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { public static function formRule($fields, $fileParams, $options) { $errors = []; - $doParentCheck = $options['doParentCheck']; $self = &$options['selfObj']; - if ($doParentCheck) { - $parentGroups = $options['parentGroups']; - - $grpRemove = 0; - foreach ($fields as $key => $val) { - if (substr($key, 0, 20) == 'remove_parent_group_') { - $grpRemove++; - } - } - - $grpAdd = 0; - if (!empty($fields['parents'])) { - $grpAdd++; - } - - if ((count($parentGroups) >= 1) && (($grpRemove - $grpAdd) >= count($parentGroups))) { - $errors['parents'] = ts('Make sure at least one parent group is set.'); - } - } - // do check for both name and title uniqueness if (!empty($fields['title'])) { $title = trim($fields['title']); -- 2.25.1