From 1f153df36a052ceba5710260eecaeb898deae665 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 30 Aug 2024 17:02:43 +0000 Subject: [PATCH] Bug 35729: Deal with 979 ISBNs for Koha cover images TO TEST: 1. APPLY PATCH and restart_all 2. Have some records with ISBN13's, both 979 and non-979. 3. Have some different ISBN's that are ISBN10. 4. Turn on each of the following cover image services, ensuring that ISBN's are loading on the staff results page, staff detail page. OPAC results page, and OPAC detail page: - AmazonCoverImages - OPACAmazonCoverImages - Coce (all 3 services ) - Babeltheque - BakerTaylorEnabled - GoogleJackets - NovelistSelectEnabled - OpenLibraryCovers - SyndeticsCoverImages --- C4/Koha.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 1c3e2ceb2d8..f7b4eace76e 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -698,7 +698,6 @@ sub _isbn_cleanup { return NormalizeISBN( { isbn => $isbn, - format => 'ISBN-10', strip_hyphens => 1, } ) if $isbn; @@ -734,11 +733,10 @@ sub NormalizeISBN { return unless $string; my $isbn = Business::ISBN->new($string); - if ( $isbn && $isbn->is_valid() ) { if ( $format eq 'ISBN-10' ) { - $isbn = $isbn->as_isbn10(); + $isbn = $isbn->as_isbn10(); } elsif ( $format eq 'ISBN-13' ) { $isbn = $isbn->as_isbn13(); -- 2.39.2