Bugzilla – Attachment 14268 Details for
Bug 9206
Only allow place holds in records that the patron don't have in his possession
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9206: Followup QA FIX
Bug-9206-Followup-QA-FIX.patch (text/plain), 3.33 KB, created by
Jonathan Druart
on 2012-12-26 14:03:40 UTC
(
hide
)
Description:
Bug 9206: Followup QA FIX
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-12-26 14:03:40 UTC
Size:
3.33 KB
patch
obsolete
>From 82e4cac404e7e80547723b9b98ff60de70f4846b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 26 Dec 2012 14:52:52 +0100 >Subject: [PATCH] Bug 9206: Followup QA FIX > >- Fix indentation >- It is useless to loop on all items. If at least 1 item is already > issued, we want to return 1. >--- > C4/Circulation.pm | 15 +++++++-------- > koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt | 12 ++++++------ > reserve/request.pl | 2 +- > 3 files changed, 14 insertions(+), 15 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 55b89f9..71fe20f 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -83,7 +83,7 @@ BEGIN { > &GetBiblioIssues > &GetOpenIssue > &AnonymiseIssueHistory >- &CheckIfIssuedToPatron >+ &CheckIfIssuedToPatron > ); > > # subs to deal with returns >@@ -3455,16 +3455,15 @@ sub TransferSlip { > =cut > > sub CheckIfIssuedToPatron { >- my ($borrowernumber, $biblionumber) = @_; >- my $isissued = 0; >+ my ($borrowernumber, $biblionumber) = @_; > >- my $items = GetItemsByBiblioitemnumber($biblionumber); >+ my $items = GetItemsByBiblioitemnumber($biblionumber); > >- foreach my $item (@{$items}) { >- $isissued = 1 if ($item->{borrowernumber} && $item->{borrowernumber} eq $borrowernumber); >- } >+ foreach my $item (@{$items}) { >+ return 1 if ($item->{borrowernumber} && $item->{borrowernumber} eq $borrowernumber); >+ } > >- return $isissued; >+ return; > } > > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >index 1c5205d..53ccbbf 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >@@ -293,12 +293,12 @@ > [% UNLESS ( bibitemloo.bib_available ) %] > <div class="bibmessage">No available items.</div> > [% ELSE %] >- [% IF ( bibitemloo.already_patron_possession ) %] >- <div class="bibmessage">This title cannot be requested because it's already in your possession.</div> >- [% ELSE %] >- <div class="bibmessage">This title cannot be requested.</div> >- [% END %] >- [% END %] >+ [% IF ( bibitemloo.already_patron_possession ) %] >+ <div class="bibmessage">This title cannot be requested because it's already in your possession.</div> >+ [% ELSE %] >+ <div class="bibmessage">This title cannot be requested.</div> >+ [% END %] >+ [% END %] > [% END %] > > >diff --git a/reserve/request.pl b/reserve/request.pl >index 4d1c52e..f12e0ac 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -247,7 +247,7 @@ foreach my $biblionumber (@biblionumbers) { > $warnings = 1; > $maxreserves = 1; > } >- >+ > my $alreadypossession; > if (not C4::Context->preference('AllowHoldsOnPatronsPossessions') and CheckIfIssuedToPatron($borrowerinfo->{borrowernumber},$biblionumber)) { > $warnings = 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 9206
:
13881
|
14126
|
14127
|
14266
|
14267
| 14268