From 4d9851f6a0e67afc14a6702502c609d969ce0772 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 1 Nov 2019 10:53:58 +1300 Subject: [PATCH] dev/event#19 remove obsolete scriptFee & scriptArray https://lab.civicrm.org/dev/event/issues/19#note_25984 Both @mattwire & myself determined these are obsolete, unused parameters, removing --- CRM/Event/Form/Registration/AdditionalParticipant.php | 3 --- CRM/Event/Form/Registration/Register.php | 3 --- .../CRM/Event/Form/Registration/ConfirmTest.php | 10 ---------- 3 files changed, 16 deletions(-) diff --git a/CRM/Event/Form/Registration/AdditionalParticipant.php b/CRM/Event/Form/Registration/AdditionalParticipant.php index b09b13ff3b80..7e9eb11c5eae 100644 --- a/CRM/Event/Form/Registration/AdditionalParticipant.php +++ b/CRM/Event/Form/Registration/AdditionalParticipant.php @@ -174,9 +174,6 @@ public function buildQuickForm() { $button = substr($this->controller->getButtonName(), -4); - $this->add('hidden', 'scriptFee', NULL); - $this->add('hidden', 'scriptArray', NULL); - if ($this->_values['event']['is_monetary']) { CRM_Event_Form_Registration_Register::buildAmount($this); } diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index ac1388a35b3b..35382c45e162 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -343,9 +343,6 @@ public function buildQuickForm() { $this->assign('display_name', CRM_Contact_BAO_Contact::displayName($contactID)); } - $this->add('hidden', 'scriptFee', NULL); - $this->add('hidden', 'scriptArray', NULL); - $bypassPayment = $allowGroupOnWaitlist = $isAdditionalParticipants = FALSE; if ($this->_values['event']['is_multiple_registrations']) { // don't allow to add additional during confirmation if not preregistered. diff --git a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php index f7f229fdb174..ba5884f24a24 100644 --- a/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php +++ b/tests/phpunit/CRM/Event/Form/Registration/ConfirmTest.php @@ -50,8 +50,6 @@ public function testSubmit() { 'billing_state_province_id-5' => '1061', 'billing_postal_code-5' => '7', 'billing_country_id-5' => '1228', - 'scriptFee' => '', - 'scriptArray' => '', 'priceSetId' => '6', 'price_7' => [ 13 => 1, @@ -264,8 +262,6 @@ public function testTaxMultipleParticipant() { 'first_name' => 'Participant2', 'last_name' => 'LastName', 'email-Primary' => 'participant2@example.com', - 'scriptFee' => '', - 'scriptArray' => '', 'campaign_id' => NULL, 'is_pay_later' => 1, 'participant_role_id' => '1', @@ -280,8 +276,6 @@ public function testTaxMultipleParticipant() { 'first_name' => 'Participant3', 'last_name' => 'LastName', 'email-Primary' => 'participant3@example.com', - 'scriptFee' => '', - 'scriptArray' => '', 'campaign_id' => NULL, 'is_pay_later' => 1, 'participant_role_id' => '1', @@ -376,8 +370,6 @@ public function testOnlineRegNoPrice() { 'ip_address' => '127.0.0.1', 'invoiceID' => '57adc34957a29171948e8643ce906332', 'button' => '_qf_Register_upload', - 'scriptFee' => '', - 'scriptArray' => '', ], ], ]); @@ -457,8 +449,6 @@ private function submitWithNote($event, $contact_id) { 'billing_state_province_id-5' => '1061', 'billing_postal_code-5' => '7', 'billing_country_id-5' => '1228', - 'scriptFee' => '', - 'scriptArray' => '', 'priceSetId' => '6', 'price_7' => [ 13 => 1,