Bugzilla – Attachment 67121 Details for
Bug 19300
Move C4::Reserves::OPACItemHoldsAllowed to the Koha namespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19300: Replace C4::Reserves::OPACItemHoldsAllowed - Remove the subroutine
Bug-19300-Replace-C4ReservesOPACItemHoldsAllowed--.patch (text/plain), 2.66 KB, created by
Jonathan Druart
on 2017-09-13 19:22:30 UTC
(
hide
)
Description:
Bug 19300: Replace C4::Reserves::OPACItemHoldsAllowed - Remove the subroutine
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-09-13 19:22:30 UTC
Size:
2.66 KB
patch
obsolete
>From f1ef2c16e2e68c2c096f85dea8a62fdc284fe4c4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 11 Sep 2017 14:16:07 -0300 >Subject: [PATCH] Bug 19300: Replace C4::Reserves::OPACItemHoldsAllowed - > Remove the subroutine > >At this point the subroutine is not longer in use, we can remove it >--- > C4/Reserves.pm | 50 -------------------------------------------------- > 1 file changed, 50 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 5da7212819..c700d339b7 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -126,8 +126,6 @@ BEGIN { > > &IsAvailableForItemLevelRequest > >- &OPACItemHoldsAllowed >- > &AlterPriority > &ToggleLowestPriority > >@@ -1716,54 +1714,6 @@ sub _ShiftPriorityByDateAndPriority { > return $new_priority; # so the caller knows what priority they wind up receiving > } > >-=head2 OPACItemHoldsAllowed >- >- OPACItemHoldsAllowed($item_record,$borrower_record); >- >-Checks issuingrules, using the borrowers categorycode, the itemtype, and branchcode to see >-if specific item holds are allowed, returns true if so. >- >-=cut >- >-sub OPACItemHoldsAllowed { >- my ($item,$borrower) = @_; >- >- my $branchcode = $item->{homebranch} or die "No homebranch"; >- my $itype; >- my $dbh = C4::Context->dbh; >- if (C4::Context->preference('item-level_itypes')) { >- # We can't trust GetItem to honour the syspref, so safest to do it ourselves >- # When GetItem is fixed, we can remove this >- $itype = $item->{itype}; >- } >- else { >- my $query = "SELECT itemtype FROM biblioitems WHERE biblioitemnumber = ? "; >- my $sth = $dbh->prepare($query); >- $sth->execute($item->{biblioitemnumber}); >- if (my $data = $sth->fetchrow_hashref()){ >- $itype = $data->{itemtype}; >- } >- } >- >- my $query = "SELECT opacitemholds,categorycode,itemtype,branchcode FROM issuingrules WHERE >- (issuingrules.categorycode = ? OR issuingrules.categorycode = '*') >- AND >- (issuingrules.itemtype = ? OR issuingrules.itemtype = '*') >- AND >- (issuingrules.branchcode = ? OR issuingrules.branchcode = '*') >- ORDER BY >- issuingrules.categorycode desc, >- issuingrules.itemtype desc, >- issuingrules.branchcode desc >- LIMIT 1"; >- my $sth = $dbh->prepare($query); >- $sth->execute($borrower->{categorycode},$itype,$branchcode); >- my $data = $sth->fetchrow_hashref; >- my $opacitemholds = uc substr ($data->{opacitemholds}, 0, 1); >- return '' if $opacitemholds eq 'N'; >- return $opacitemholds; >-} >- > =head2 MoveReserve > > MoveReserve( $itemnumber, $borrowernumber, $cancelreserve ) >-- >2.11.0
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 19300
:
67119
|
67120
|
67121
|
67388
|
67389
|
67390
|
70101
|
70102
|
70103