Bugzilla – Attachment 129929 Details for
Bug 29562
Pass objects to CanItemBeReserved and checkHighHolds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29562: Test $item instead of $itemNum
Bug-29562-Test-item-instead-of-itemNum.patch (text/plain), 1.76 KB, created by
Jonathan Druart
on 2022-01-28 12:21:46 UTC
(
hide
)
Description:
Bug 29562: Test $item instead of $itemNum
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-01-28 12:21:46 UTC
Size:
1.76 KB
patch
obsolete
>From 0ee13cec67dc4683d1df832133a9403454e426fa Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 10 Jan 2022 13:56:30 +0100 >Subject: [PATCH] Bug 29562: Test $item instead of $itemNum > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > opac/opac-reserve.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 24e784c9612..4e7ebb72ac6 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -241,7 +241,7 @@ if ( $query->param('place_reserve') ) { > > my $item = $itemNum ? Koha::Items->find( $itemNum ) : undef; > # When choosing a specific item, the default pickup library should be dictated by the default hold policy >- if ( ! C4::Context->preference("OPACAllowUserToChooseBranch") && $itemNum ) { >+ if ( ! C4::Context->preference("OPACAllowUserToChooseBranch") && $item ) { > my $type = $item->effective_itemtype; > my $rule = GetBranchItemRule( $patron->branchcode, $type ); > >@@ -256,7 +256,7 @@ if ( $query->param('place_reserve') ) { > } > > #item may belong to a host biblio, if yes change biblioNum to hosts bilbionumber >- if ( $itemNum ) { >+ if ( $item ) { > my $hostbiblioNum = $item->biblio->biblionumber; > if ( $hostbiblioNum ne $biblioNum ) { > $biblioNum = $hostbiblioNum; >@@ -278,7 +278,7 @@ if ( $query->param('place_reserve') ) { > > my $rank = $biblioData->{rank}; > my $patron = Koha::Patrons->find( $borrowernumber ); >- if ( $itemNum ) { >+ if ( $item ) { > $canreserve = 1 if CanItemBeReserved( $patron, $item, $branch )->{status} eq 'OK'; > } > else { >-- >2.25.1
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 29562
:
127966
|
129245
|
129246
|
129252
|
129253
|
129254
|
129255
|
129257
|
129261
|
129262
|
129263
|
129264
|
129926
|
129927
|
129928
| 129929 |
130033