Lines 131-138
if ( $borrowernumber && C4::Context->preference("MaxOpenSuggestions") ne '' ) {
Link Here
|
131 |
$patrons_pending_suggestions_count = scalar @{ SearchSuggestion( { suggestedby => $borrowernumber, STATUS => 'ASKED' } ) } ; |
131 |
$patrons_pending_suggestions_count = scalar @{ SearchSuggestion( { suggestedby => $borrowernumber, STATUS => 'ASKED' } ) } ; |
132 |
} |
132 |
} |
133 |
|
133 |
|
134 |
my $suggestions_loop = &SearchSuggestion($suggestion); |
|
|
135 |
if ( $op eq "add_confirm" ) { |
134 |
if ( $op eq "add_confirm" ) { |
|
|
135 |
my $suggestions_loop = &SearchSuggestion($suggestion); |
136 |
if ( C4::Context->preference("MaxOpenSuggestions") ne '' && $patrons_pending_suggestions_count >= C4::Context->preference("MaxOpenSuggestions") ) #only check limit for signed in borrowers |
136 |
if ( C4::Context->preference("MaxOpenSuggestions") ne '' && $patrons_pending_suggestions_count >= C4::Context->preference("MaxOpenSuggestions") ) #only check limit for signed in borrowers |
137 |
{ |
137 |
{ |
138 |
push @messages, { type => 'error', code => 'too_many' }; |
138 |
push @messages, { type => 'error', code => 'too_many' }; |
139 |
- |
|
|