Duplicate code (for real)
authoreileen <emcnaughton@wikimedia.org>
Thu, 23 Jan 2020 21:33:54 +0000 (10:33 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 23 Jan 2020 22:27:29 +0000 (11:27 +1300)
commit44237a295dc5eab4f6110fb0556b1af742364f6e
tree5d7bbbd6f51691e42f10f1884a04482699a50ab4
parent864483f6d90ffa4d4242c2b8ab076ca318d2600a
Duplicate code (for real)

This is going to seem unintuitive but I'm sure the path to cleaning up the participant form starts with
increasing code duplication.

Currently the code is sharing 2 functions with the front end form. The functions don't do a lot of actual processing
but they do do a lot of preparing parameters. The calling functions do a lot of pre-work to call them - so
we are not getting much benefit from the sharing. On the other hand having this code tied up with another form makes
it hard for us to do the 'right' sharing - ie. currently the code to create a contribution paid by credit card & participant record is totally different to another payment method & we should work to share these bits of functionality
CRM/Event/Form/Participant.php
CRM/Event/Form/Registration.php
CRM/Event/Form/Registration/Confirm.php