From 975c81af49da8f8db5029f07de59e2dc2622bd06 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 https://bugs.koha-community.org/show_bug.cgi?id=14963 --- 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 b5765f3..91eaebe 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.1.4