From 13bddb58186124d1a6cdaef3d55e320d90105906 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Sat, 17 May 2008 21:35:48 -0400 Subject: [PATCH] Fixing Amazon.com Similar Items and Editions features Signed-off-by: Joshua Ferraro --- C4/XISBN.pm | 10 ++++--- .../prog/en/modules/opac-detail.tmpl | 30 +++++++++---------- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 13 -------- 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/C4/XISBN.pm b/C4/XISBN.pm index 1a177c18d2..e496cba6c8 100644 --- a/C4/XISBN.pm +++ b/C4/XISBN.pm @@ -42,10 +42,10 @@ BEGIN { sub get_biblionumber_from_isbn { my $isbn = shift; $isbn =~ /(\d*[X]*)/; - $isbn = $1; + $isbn = $1.'%' if $isbn; my @biblionumbers; my $dbh=C4::Context->dbh; - my $query = "SELECT biblionumber FROM biblioitems WHERE isbn=?"; + my $query = "SELECT biblionumber FROM biblioitems WHERE isbn LIKE ?"; my $sth = $dbh->prepare($query); $sth->execute($isbn); while ( my $biblionumber = $sth->fetchrow_hashref() ) { @@ -65,8 +65,9 @@ This module provides facilities for retrieving ThingISBN and XISBN content in Ko sub get_biblio_from_xisbn { my $xisbn = shift; + $xisbn .='%' if ($xisbn =~ /(\d*[X]*)/); my $dbh = C4::Context->dbh; - my $query = "SELECT biblionumber FROM biblioitems WHERE isbn=?"; + my $query = "SELECT biblionumber FROM biblioitems WHERE isbn LIKE ?"; my $sth = $dbh->prepare($query); $sth->execute($xisbn); my $xbib_data = $sth->fetchrow_hashref(); @@ -89,7 +90,8 @@ sub get_biblio_from_xisbn { sub get_xisbns { my ( $isbn ) = @_; my ($response,$thing_response,$xisbn_response,$gapines_response); - + $isbn =~ /(\d*[X]*)/; + $isbn = $1; # THINGISBN if ( C4::Context->preference('ThingISBN') ) { my $url = "http://www.librarything.com/api/thingISBN/".$isbn; diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index b46abed5d2..425ca03f24 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -233,25 +233,25 @@ - - - - - - + + + + + + - - - - + + + + - - + + @@ -455,7 +455,7 @@

Other Editions of this Work

Item typeCollectionLocationCall NumberVol InfoCopyItem typeLocationCollectionCall NumberVol InfoCopy Serial DataPublishedStatusDate DueSerial DataPublishedStatusDate Due
" title="" alt="" /> - " title="" alt="" /> + (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf)
-
.01._AA75_PU_PU-5_.jpg" alt="" />"> by © +
.01._AA75_PU_PU-5_.jpg" alt="" />"> by ©

() ,

@@ -524,7 +524,7 @@ - +

Similar Items

    diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index 7f5b4d3fa5..ef692a0445 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -48,14 +48,6 @@ Music - - - - ab - - .; - -
    @@ -132,11 +124,6 @@ - - Library of Congress Classification: - - - Series: -- 2.39.5