Bugzilla – Attachment 27986 Details for
Bug 12197
Exceeding the maxreserves preference does not prevent librarian from placing the hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12197: (follow-up) rename variable for greater clarity
Bug-12197-follow-up-rename-variable-for-greater-cl.patch (text/plain), 3.69 KB, created by
Galen Charlton
on 2014-05-06 15:56:06 UTC
(
hide
)
Description:
Bug 12197: (follow-up) rename variable for greater clarity
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2014-05-06 15:56:06 UTC
Size:
3.69 KB
patch
obsolete
>From de2e1918174ef5db449612c94fce51c1cf7a2baf Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Tue, 6 May 2014 15:44:05 +0000 >Subject: [PATCH] Bug 12197: (follow-up) rename variable for greater clarity > >"maxreserves" was referring both to the system preference and to the >condition of having exceeded the number of hold requests allowed. > >This patch renames a variable to remove the ambguity. > >Test plan: > >* Same as the main patch. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 4 ++-- > reserve/request.pl | 12 +++++++----- > 2 files changed, 9 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index cafc072..2b0679a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -237,13 +237,13 @@ function checkMultiHold() { > </form> > [% ELSE %] > >-[% IF ( maxreserves || alreadyreserved || none_available || alreadypossession ) %] >+[% IF ( exceeded_maxreserves || alreadyreserved || none_available || alreadypossession ) %] > <div class="dialog alert"> > > [% UNLESS ( multi_hold ) %] > <h3>Cannot place hold</h3> > <ul> >- [% IF ( maxreserves ) %] >+ [% IF ( exceeded_maxreserves ) %] > <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> has too many holds.</li> > [% END %] > [% IF ( alreadyreserved ) %] >diff --git a/reserve/request.pl b/reserve/request.pl >index b3beb92..94d4dc4 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -77,7 +77,7 @@ $findborrower = '' unless defined $findborrower; > $findborrower =~ s|,| |g; > my $borrowernumber_hold = $input->param('borrowernumber') || ''; > my $messageborrower; >-my $maxreserves; >+my $exceeded_maxreserves; > > my $date = C4::Dates->today('iso'); > my $action = $input->param('action'); >@@ -129,7 +129,7 @@ if ($borrowernumber_hold && !$action) { > GetReserveCount( $borrowerinfo->{'borrowernumber'} ); > > if ( C4::Context->preference('maxreserves') && ($number_reserves >= C4::Context->preference('maxreserves')) ) { >- $maxreserves = 1; >+ $exceeded_maxreserves = 1; > } > > # we check the date expiry of the borrower (only if there is an expiry date, otherwise, set to 1 (warn) >@@ -187,7 +187,9 @@ foreach my $biblionumber (@biblionumbers) { > my $dat = GetBiblioData($biblionumber); > > unless ( CanBookBeReserved($borrowerinfo->{borrowernumber}, $biblionumber) ) { >- $maxreserves = 1; >+ $exceeded_maxreserves = 1; # note that exceeding the circ policy's hold >+ # limit is not the only reason CanBookBeReserved() >+ # can return false > } > > my $alreadypossession; >@@ -406,7 +408,7 @@ foreach my $biblionumber (@biblionumbers) { > > if ( > $policy_holdallowed >- && !$maxreserves >+ && !$exceeded_maxreserves > && !$item->{cantreserve} > && IsAvailableForItemLevelRequest($itemnumber) > && CanItemBeReserved( >@@ -572,7 +574,7 @@ foreach my $biblionumber (@biblionumbers) { > > $template->param( biblioloop => \@biblioloop ); > $template->param( biblionumbers => $biblionumbers ); >-$template->param( maxreserves => $maxreserves ); >+$template->param( exceeded_maxreserves => $exceeded_maxreserves ); > > if ($multihold) { > $template->param( multi_hold => 1 ); >-- >1.7.10.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 12197
:
27984
|
27985
|
27986
|
28493
|
36952
|
42873
|
42936
|
43749