suggestion_ref is quite messy, it needs to be reworked in order to use
objects in suggestion.pl.
As far as I studied, it is used as
- the whole input from forms,
- the default content to input in a form
- the content that will be amended in order to propose another hash to
modSuggestion. However, ModSuggestion will be removed so we don't need
such a hash
- every suggestion that need to be updated using the "change selected
suggestion" tool
- create the object suggestion_only, whose purpose is still unclear to
me.
As a result it is created by :
> 25 my $suggestion_ref = { $input->Vars };
And by removing a number of keys depending on the use of suggestion_ref
in the script.
In this patch, we remove every code made to use suggestion_ref as the
source object for form and use another variable, $stored_suggestion which is an object.
In next patch we aim at fully removing $suggestion_ref, which is still
used by ModSuggestion
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>