@@ -, +, @@ --- 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(-) --- a/C4/XISBN.pm +++ a/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 --- a/catalogue/detail.pl +++ a/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); --- a/opac/opac-detail.pl +++ a/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; --- a/t/db_dependent/XISBN.t +++ a/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." ); --