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
This commit is contained in:
Jonathan Druart 2021-09-10 11:33:18 +02:00 committed by Fridolin Somers
parent e73eeb9e6a
commit 71b7e12f79
1 changed files with 4 additions and 0 deletions

View File

@ -172,6 +172,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 ) {