Bug 28941: Deal with OPACSuggestionUnwantedFields

Remove fields from OPACSuggestionUnwantedFields before creating the
suggestion

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

JD amended patch: remove useless sort

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-09-10 11:33:18 +02:00
parent 586bed1319
commit c9ad6e004b
1 changed files with 4 additions and 0 deletions

View File

@ -177,6 +177,10 @@ if ( $op eq "add_confirm" ) {
}
}
else {
for my $f ( split(/\s*\,\s*/, C4::Context->preference("OPACSuggestionUnwantedFields") ) ) {
delete $suggestion->{$f};
}
my $scrubber = C4::Scrubber->new();
foreach my $suggest ( keys %$suggestion ) {