Bugzilla – Attachment 72433 Details for
Bug 20321
C4:XISBN->get_biblionumber_from_isbn is not used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20321 - Remove get_biblionumber_from_isbn
Bug-20321---Remove-getbiblionumberfromisbn.patch (text/plain), 3.11 KB, created by
Josef Moravec
on 2018-03-05 11:39:38 UTC
(
hide
)
Description:
Bug 20321 - Remove get_biblionumber_from_isbn
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-03-05 11:39:38 UTC
Size:
3.11 KB
patch
obsolete
>From c2da4996ac8a82eac1304b8f3bd617e7170f960e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 1 Mar 2018 16:30:35 +0000 >Subject: [PATCH] Bug 20321 - Remove get_biblionumber_from_isbn > >To test: >1 - grep get_biblionumber_from_isbn >2 - verify all occurences are not actual calls (except for test) >3 - Apply patch >4 - grep get_biblionumber_from_isbn >5 - Verify it is removed > >Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > C4/XISBN.pm | 11 ----------- > catalogue/detail.pl | 2 +- > opac/opac-detail.pl | 2 +- > t/db_dependent/XISBN.t | 9 ++------- > 4 files changed, 4 insertions(+), 20 deletions(-) > >diff --git a/C4/XISBN.pm b/C4/XISBN.pm >index f3d202f..884d772 100644 >--- a/C4/XISBN.pm >+++ b/C4/XISBN.pm >@@ -39,20 +39,9 @@ BEGIN { > @ISA = qw(Exporter); > @EXPORT_OK = qw( > &get_xisbns >- &get_biblionumber_from_isbn > ); > } > >-sub get_biblionumber_from_isbn { >- my $isbn = shift; >- $isbn.='%'; >- my @biblionumbers; >- my $dbh=C4::Context->dbh; >- my $query = "SELECT biblionumber FROM biblioitems WHERE isbn LIKE ? LIMIT 10"; >- my $sth = $dbh->prepare($query); >- $sth->execute($isbn); >- return $sth->fetchall_arrayref({}); >-} > =head1 NAME > > C4::XISBN - Functions for retrieving XISBN content in Koha >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 58d4511..adf3737 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -30,7 +30,7 @@ use C4::Items; > use C4::Circulation; > use C4::Reserves; > use C4::Serials; >-use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn); >+use C4::XISBN qw(get_xisbns); > use C4::External::Amazon; > use C4::Search; # enabled_staff_search_views > use C4::Tags qw(get_tags); >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index e7653d9..088039a 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -32,7 +32,7 @@ use C4::Biblio; > use C4::Items; > use C4::Circulation; > use C4::Tags qw(get_tags); >-use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn); >+use C4::XISBN qw(get_xisbns); > use C4::External::Amazon; > use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes ); > use C4::Members; >diff --git a/t/db_dependent/XISBN.t b/t/db_dependent/XISBN.t >index df598ce..23fea72 100755 >--- a/t/db_dependent/XISBN.t >+++ b/t/db_dependent/XISBN.t >@@ -5,7 +5,7 @@ > > use Modern::Perl; > >-use Test::More tests => 5; >+use Test::More tests => 4; > use MARC::Record; > use C4::Biblio; > use C4::XISBN; >@@ -45,12 +45,7 @@ my $biblionumber1 = _add_biblio_with_isbn($isbn1); > my $biblionumber2 = _add_biblio_with_isbn($isbn2); > my $biblionumber3 = _add_biblio_with_isbn($isbn3); > >-my $trial = C4::XISBN::get_biblionumber_from_isbn($isbn1); >-is( $trial->[0]->{biblionumber}, >- $biblionumber1, >- "It gets the correct biblionumber from the only isbn we have added." ); >- >-$trial = C4::XISBN::_get_biblio_from_xisbn($isbn1); >+my $trial = C4::XISBN::_get_biblio_from_xisbn($isbn1); > is( $trial->{biblionumber}, > $biblionumber1, "Gets biblionumber like the previous test." ); > >-- >2.1.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 20321
:
72340
|
72385
| 72433