From 4d95af2968c670d03c438995c49f1652d14b9724 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 30 Apr 2009 13:06:24 -0500 Subject: [PATCH] fix to C4::Koha::_isbn_cleanup Both valid ISBN-10s and -13s can use 'X' as a checkdigit value. Signed-off-by: Galen Charlton --- C4/Koha.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 418b8156ca..b4ce84b83d 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -1206,10 +1206,11 @@ sub _normalize_match_point { sub _isbn_cleanup ($) { my $normalized_isbn = shift; $normalized_isbn =~ s/-//g; - $normalized_isbn =~/([0-9]{1,})/; + $normalized_isbn =~/([0-9x]{1,})/i; $normalized_isbn = $1; if ( $normalized_isbn =~ /\b(\d{13})\b/ or + $normalized_isbn =~ /\b(\d{12})\b/i or $normalized_isbn =~ /\b(\d{10})\b/ or $normalized_isbn =~ /\b(\d{9}X)\b/i ) { -- 2.39.5