Bug 15128: Do not display "New suggestion" if limit has just been reached
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>
This commit is contained in:
parent
2c2efbf4a6
commit
1b89150d42
1 changed files with 1 additions and 0 deletions
|
@ -148,6 +148,7 @@ if ( $op eq "add_confirm" ) {
|
|||
$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 ) ) {
|
||||
|
|
Loading…
Reference in a new issue