From 56ca4dd8a591283a20a544a717708c4cc3ca3956 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 10 Sep 2021 11:33:18 +0200 Subject: [PATCH] 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 (cherry picked from commit 1b4b353440501dbd0a8fb12b4949ba49203ccc63) Signed-off-by: Victor Grousset/tuxayo --- opac/opac-suggestions.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index 2f98ce57d4..ccd7871f97 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -171,6 +171,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 ) { -- 2.39.5