Bugzilla – Attachment 97668 Details for
Bug 24468
C4::Reserves::_get_itype is no longer used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24468: Remove unused C4::Reserves::_get_itype subroutine
Bug-24468-Remove-unused-C4Reservesgetitype-subrout.patch (text/plain), 1.90 KB, created by
Jonathan Druart
on 2020-01-21 14:52:50 UTC
(
hide
)
Description:
Bug 24468: Remove unused C4::Reserves::_get_itype subroutine
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-01-21 14:52:50 UTC
Size:
1.90 KB
patch
obsolete
>From 07ebfb38445e07a70f1f227b0ca8a5405392efa8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 21 Jan 2020 15:51:22 +0100 >Subject: [PATCH] Bug 24468: Remove unused C4::Reserves::_get_itype subroutine > >Since bug 21206, C4::Reserves::_get_itype is not longer used and should >be removed. > > commit 31c29fd31f557306233e6a2936148a5bb10b89a1 > Bug 21206: Replace C4::Items::GetItem > >Test plan: > % git grep _get_itype >must not return any occurrences. > >If one needs it, Koha::Item->effective_itemtype must be used instead. >--- > C4/Reserves.pm | 27 --------------------------- > 1 file changed, 27 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 05d5910812..9a01dcbc7c 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1267,33 +1267,6 @@ sub IsAvailableForItemLevelRequest { > } > } > >-sub _get_itype { >- my $item = shift; >- >- my $itype; >- 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 { >- # XXX This is a bit dodgy. It relies on biblio itemtype column having different name. >- # So if we already have a biblioitems join when calling this function, >- # we don't need to access the database again >- $itype = $item->{itemtype}; >- } >- unless ($itype) { >- my $dbh = C4::Context->dbh; >- 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}; >- } >- } >- return $itype; >-} >- > =head2 AlterPriority > > AlterPriority( $where, $reserve_id, $prev_priority, $next_priority, $first_priority, $last_priority ); >-- >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 24468
:
97668
|
100968
|
101315
|
101379