Bugzilla – Attachment 70381 Details for
Bug 19940
Koha::Biblio - Remove GetBiblioItemInfosOf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19940: Koha::Biblio - Remove GetBiblioItemInfosOf
Bug-19940-KohaBiblio---Remove-GetBiblioItemInfosOf.patch (text/plain), 2.56 KB, created by
Jonathan Druart
on 2018-01-09 17:19:27 UTC
(
hide
)
Description:
Bug 19940: Koha::Biblio - Remove GetBiblioItemInfosOf
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-01-09 17:19:27 UTC
Size:
2.56 KB
patch
obsolete
>From c3d0c71ba4703f1456ec4720b240bae02a1931c8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 9 Jan 2018 13:58:53 -0300 >Subject: [PATCH] Bug 19940: Koha::Biblio - Remove GetBiblioItemInfosOf > >This subroutine is only used once and can be replaced easily with a >Koha::Biblioitems->search call > >Test plan: >Test this on top of bug 19941 and confirm that the correct item types >are displayed >--- > C4/Biblio.pm | 23 ----------------------- > reserve/request.pl | 12 ++++++++++-- > 2 files changed, 10 insertions(+), 25 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 03d9a605fb..06cc8b78e1 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -68,7 +68,6 @@ BEGIN { > GetBiblioData > GetMarcBiblio > GetBiblioItemData >- GetBiblioItemInfosOf > GetBiblioItemByBiblioNumber > > &GetRecordValue >@@ -909,28 +908,6 @@ sub GetISBDView { > return $res; > } > >-=head2 GetBiblioItemInfosOf >- >- GetBiblioItemInfosOf(@biblioitemnumbers); >- >-=cut >- >-sub GetBiblioItemInfosOf { >- my @biblioitemnumbers = @_; >- >- my $biblioitemnumber_values = @biblioitemnumbers ? join( ',', @biblioitemnumbers ) : "''"; >- >- my $dbh = C4::Context->dbh; >- my $query = " >- SELECT biblioitemnumber, >- publicationyear, >- itemtype >- FROM biblioitems >- WHERE biblioitemnumber IN ($biblioitemnumber_values) >- "; >- return $dbh->selectall_hashref($query, 'biblioitemnumber'); >-} >- > =head1 FUNCTIONS FOR HANDLING MARC MANAGEMENT > > =head2 IsMarcStructureInternal >diff --git a/reserve/request.pl b/reserve/request.pl >index f705b60df6..7f06be6f75 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -329,8 +329,16 @@ foreach my $biblionumber (@biblionumbers) { > ## Should be same as biblionumber > my @biblioitemnumbers = keys %itemnumbers_of_biblioitem; > >- ## Hash of biblioitemnumber to 'biblioitem' table records >- my $biblioiteminfos_of = GetBiblioItemInfosOf(@biblioitemnumbers); >+ my $biblioiteminfos_of = { >+ map { >+ my $biblioitem = $_; >+ ( $biblioitem->{biblioitemnumber} => $biblioitem ) >+ } @{ Koha::Biblioitems->search( >+ { biblioitemnumber => { -in => \@biblioitemnumbers } }, >+ { select => ['biblioitemnumber', 'publicationyear', 'itemtype']} >+ )->unblessed >+ } >+ }; > > my $frameworkcode = GetFrameworkCode( $biblionumber ); > my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode }); >-- >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 19940
:
70381
|
72438
|
72555