From 1b89150d42548304d37fdb1def5ffd727d719f69 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 1 Jul 2016 17:00:39 +0100 Subject: [PATCH] Bug 15128: Do not display "New suggestion" if limit has just been reached If limit is X and patrons has X-1 pending suggestions, when a new one is added, the "New suggestion" should not been added. to avoid another call to SearchSuggestions, we assume than the suggestion has been correctly added. Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- opac/opac-suggestions.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index 1cc96c2d6a..628f864b30 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -148,6 +148,7 @@ if ( $op eq "add_confirm" ) { $suggestion->{branchcode} = $input->param('branchcode') || C4::Context->userenv->{"branch"}; &NewSuggestion($suggestion); + $patrons_pending_suggestions_count++; # delete empty fields, to avoid filter in "SearchSuggestion" foreach my $field ( qw( title author publishercode copyrightdate place collectiontitle isbn STATUS ) ) { -- 2.39.5