From 54e815e433de46d2c0bd3499d32e53f9037f1d09 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 14 Dec 2023 18:24:46 +1300 Subject: [PATCH] Remove front-end-only optionFullIds variable --- CRM/Event/Form/Participant.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index ffacee1f1a..8fc3c2fa04 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -2181,7 +2181,6 @@ INNER JOIN civicrm_price_field_value value ON ( value.id = lineItem.price_field_ $optionFullTotalAmount = 0; $currentParticipantNo = (int) substr($form->_name, 12); foreach ($form->_feeBlock as & $field) { - $optionFullIds = []; $fieldId = $field['id']; if (!is_array($field['options'])) { continue; @@ -2200,17 +2199,11 @@ INNER JOIN civicrm_price_field_value value ON ( value.id = lineItem.price_field_ (empty($form->_lineItem[$currentParticipantNo][$optId]['price_field_id']) || $dbTotalCount >= $maxValue)) ) { $isFull = TRUE; - $optionFullIds[$optId] = $optId; - if ($field['html_type'] != 'Select') { + if ($field['html_type'] !== 'Select') { if (in_array($optId, $defaultPricefieldIds)) { $optionFullTotalAmount += $option['amount'] ?? 0; } } - else { - if (!empty($defaultPricefieldIds) && in_array($optId, $defaultPricefieldIds)) { - unset($optionFullIds[$optId]); - } - } } //here option is not full, //but we don't want to allow participant to increase -- 2.25.1