From: Jonathan Druart Date: Fri, 10 Sep 2021 09:33:18 +0000 (+0200) Subject: Bug 28941: Deal with OPACSuggestionUnwantedFields X-Git-Tag: v21.11.00~767 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=c9ad6e004bf85cab3aae496266a4d5fefc8d14be;p=koha-ffzg.git Bug 28941: Deal with OPACSuggestionUnwantedFields Remove fields from OPACSuggestionUnwantedFields before creating the suggestion Signed-off-by: Marcel de Rooy JD amended patch: remove useless sort Signed-off-by: Jonathan Druart --- diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index e4ed209033..6f6e91b45a 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -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 ) {