From b526b4fdde41f7695d4e586a2cad57853d6c809c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 17 Jun 2016 21:57:15 -0400 Subject: [PATCH] Bug 16767 - OPAC suggestions, existing suggestions don't show after placing a suggestion To test: 1 - Before applying this patch, place some suggestions 2 - Note that on success you see no suggestions 3 - Apply this patch 4 - Add a suggestion, note you see the new suggestion and all other 5 - Add a duplicate suggestion, note suggestions is rejected and you see all existing --- C4/Suggestions.pm | 1 - opac/opac-suggestions.pl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index 8e76cea..1c52c8d 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -162,7 +162,6 @@ sub SearchSuggestion { and $suggestion->{$field} ne '__ANY__' and ( $suggestion->{$field} ne q|| - or $field eq 'STATUS' ) ) { if ( $suggestion->{$field} eq '__NONE__' ) { diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index aad0e85..d6a7219 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -133,7 +133,7 @@ if ( $op eq "add_confirm" ) { &NewSuggestion($suggestion); # empty fields, to avoid filter in "SearchSuggestion" - $$suggestion{$_}='' foreach qw; + $suggestion->{$_}='' foreach qw<title author publishercode copyrightdate place collectiontitle isbn STATUS itemtype>; $suggestions_loop = &SearchSuggestion( $suggestion ); push @messages, { type => 'info', code => 'success_on_inserted' }; -- 2.1.4