Bug 15128 - (QA Followup) Don't get patrons suggestions if limit not set
authorNick Clemens <nick@bywatersolutions.com>
Fri, 1 Jul 2016 15:39:00 +0000 (11:39 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 8 Jul 2016 14:09:49 +0000 (14:09 +0000)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
opac/opac-suggestions.pl

index 4691d0e..52c0775 100755 (executable)
@@ -113,7 +113,7 @@ if ( $op eq 'else' ) {
 }
 
 my $patrons_pending_suggestions_count = 0;
-if ( $borrowernumber ) {
+if ( $borrowernumber && C4::Context->preference("MaxOpenSuggestions") ne '' ) {
     $patrons_pending_suggestions_count = scalar @{ SearchSuggestion( { suggestedby => $borrowernumber, STATUS => 'ASKED' } ) } ;
 }