From db0baf8390842a7580f65459864bf9a12036fbdb Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 6 Nov 2019 17:23:33 +0100 Subject: [PATCH] Bug 14973: Remove double declaration of suggestions_loop --- opac/opac-suggestions.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index b5765f3ab2..91eaebe90b 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -131,8 +131,8 @@ if ( $borrowernumber && C4::Context->preference("MaxOpenSuggestions") ne '' ) { $patrons_pending_suggestions_count = scalar @{ SearchSuggestion( { suggestedby => $borrowernumber, STATUS => 'ASKED' } ) } ; } -my $suggestions_loop = &SearchSuggestion($suggestion); if ( $op eq "add_confirm" ) { + my $suggestions_loop = &SearchSuggestion($suggestion); if ( C4::Context->preference("MaxOpenSuggestions") ne '' && $patrons_pending_suggestions_count >= C4::Context->preference("MaxOpenSuggestions") ) #only check limit for signed in borrowers { push @messages, { type => 'error', code => 'too_many' }; -- 2.11.0