New contribution may overwrite other contribution if it's opened in other tab
When creating new contributions, existing ones may be overwritten if they were opened in a separate tab at some point after opening the "Record Contribution" form.
This was reproduced against master and 5.7.
Steps to reproduce:
- Open Contact A and open the "Record Contribution" form.
- Open Contact B in a new tab and click on "View" or "Edit" on one of their contributions.
- Go back to the first tab
- Fill in the form and save the contribution.
Contact A should have a new contribution.
Contact A does not have a new contribution, and the contribution from step 2 was overwritten with values from the "Record Contribution" form.
I'd guess session variables are used in a place where you don't really want to use session variables.