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 <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
$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 ) ) {