From: Jonathan Druart Date: Fri, 1 Jul 2016 15:55:39 +0000 (+0100) Subject: Bug 15128: Revert Display all purchase suggestions whether or not suggestion was... X-Git-Tag: v16.11.00~1151 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;ds=sidebyside;h=2c2efbf4a66fb3f8c0d1212d960d5d202518bc7b;p=koha-ffzg.git Bug 15128: Revert Display all purchase suggestions whether or not suggestion was added This does not work correctly and should be handle on another bug report. The behavior existed prior to this patchset. Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index 52c0775c26..1cc96c2d6a 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -148,14 +148,16 @@ if ( $op eq "add_confirm" ) { $suggestion->{branchcode} = $input->param('branchcode') || C4::Context->userenv->{"branch"}; &NewSuggestion($suggestion); + + # delete empty fields, to avoid filter in "SearchSuggestion" + foreach my $field ( qw( title author publishercode copyrightdate place collectiontitle isbn STATUS ) ) { + delete $suggestion->{$field}; #clear search filters (except borrower related) to show all suggestions after placing a new one + } + $suggestions_loop = &SearchSuggestion($suggestion); + push @messages, { type => 'info', code => 'success_on_inserted' }; } - # delete empty fields, to avoid filter in "SearchSuggestion" and load all suggestions for display - foreach my $field ( qw( title author publishercode copyrightdate place collectiontitle isbn STATUS ) ) { - delete $suggestion->{$field}; #clear search filters (except borrower related) to show all suggestions after placing a new one - } - $suggestions_loop = &SearchSuggestion($suggestion); $op = 'else'; }