Bugzilla – Attachment 52718 Details for
Bug 15128
Add ability to limit the number of open purchase suggestions a patron can make
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15128 - Followup
Bug-15128---Followup.patch (text/plain), 2.05 KB, created by
Nicole C. Engard
on 2016-06-23 13:25:11 UTC
(
hide
)
Description:
Bug 15128 - Followup
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2016-06-23 13:25:11 UTC
Size:
2.05 KB
patch
obsolete
>From 398f4033ee250316e2c941b0d2d045a8fd210582 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 20 Jun 2016 16:04:21 -0400 >Subject: [PATCH] Bug 15128 - Followup > >Only check limit for signed in borrower >Show all suggestions after a new one is added > >Signed-off-by: Barbara Walters <bwalters@ncrl.org> >--- > opac/opac-suggestions.pl | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl >index 6d2b88b..ff64dcb 100755 >--- a/opac/opac-suggestions.pl >+++ b/opac/opac-suggestions.pl >@@ -112,12 +112,14 @@ if ( $op eq 'else' ) { > } > } > >-my $patrons_pending_suggestions_count = scalar @{ SearchSuggestion( { suggestedby => $borrowernumber, STATUS => 'ASKED' } ) }; >+my $patrons_pending_suggestions_count = 0; >+if ( $borrowernumber ) { >+ my $patrons_pending_suggestions_count = scalar @{ SearchSuggestion( { suggestedby => $borrowernumber, STATUS => 'ASKED' } ) } ; >+} > > my $suggestions_loop = &SearchSuggestion($suggestion); > if ( $op eq "add_confirm" ) { >- my $count_own_suggestions = $borrowernumber ? &SearchSuggestion( { suggestedby => $borrowernumber } ) : 0; >- if ( $patrons_pending_suggestions_count >= C4::Context->preference("MaxOpenSuggestions") ) >+ if ( $patrons_pending_suggestions_count >= C4::Context->preference("MaxOpenSuggestions") ) #only check limit for signed in borrowers > { > push @messages, { type => 'error', code => 'too_many' }; > } >@@ -149,7 +151,7 @@ if ( $op eq "add_confirm" ) { > > # delete empty fields, to avoid filter in "SearchSuggestion" > foreach my $field ( qw( title author publishercode copyrightdate place collectiontitle isbn STATUS ) ) { >- delete $suggestion->{$field} unless $suggestion->{$field}; >+ delete $suggestion->{$field}; #clear search filters (except borrower related) to show all suggestions after placing a new one > } > $suggestions_loop = &SearchSuggestion($suggestion); > push @messages, { type => 'info', code => 'success_on_inserted' }; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15128
:
52452
|
52502
|
52596
|
52610
|
52611
|
52623
|
52624
|
52625
|
52626
|
52715
|
52716
|
52717
|
52718
|
52719
|
52720
|
52721
|
52722
|
52997
|
53033
|
53034
|
53037
|
53038
|
53039
|
53040
|
53041
|
53042
|
53043
|
53044
|
53045