From 6d6b64ae4f2df8e88ab2f11d8989a7eb3d21e8cc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 17 Oct 2024 09:50:56 +0200 Subject: [PATCH] Bug 33484: Fix for suggestions This ugly fix is retrieving all CGI params and consider them attributes for suggestions. So we need to exclude other ones... There is more to make it works properly on this table. Signed-off-by: Pedro Amorim Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- suggestion/suggestion.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 2f6b53970f..83ec65b230 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -112,8 +112,10 @@ $suggestion_only->{STATUS} = $suggestion_ref->{STATUS}; delete $$suggestion_ref{$_} foreach qw( suggestedbyme op displayby tabcode notify filter_archived koha_login_context auth_forwarded_hash password userid ); -foreach (keys %$suggestion_ref){ - delete $$suggestion_ref{$_} if (!$$suggestion_ref{$_} && ($op eq 'else' )); + +foreach my $key ( keys %$suggestion_ref ) { + delete $suggestion_ref->{$key} if ( !$suggestion_ref->{$key} && ( $op eq 'else' ) ); + delete $suggestion_ref->{$key} if $key =~ m{^DataTables_acqui_suggestions_suggestions}; } delete $suggestion_only->{branchcode} if $suggestion_only->{branchcode} eq '__ANY__'; delete $suggestion_only->{budgetid} if $suggestion_only->{budgetid} eq '__ANY__'; -- 2.39.5