projects
/
koha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eccbb1a
)
fix to C4::Koha::_isbn_cleanup
author
Galen Charlton
<galen.charlton@liblime.com>
Thu, 30 Apr 2009 18:06:24 +0000
(13:06 -0500)
committer
Henri-Damien LAURENT
<henridamien.laurent@biblibre.com>
Sun, 3 May 2009 19:39:49 +0000
(21:39 +0200)
Both valid ISBN-10s and -13s can use 'X' as a checkdigit
value.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Koha.pm
patch
|
blob
|
history
diff --git
a/C4/Koha.pm
b/C4/Koha.pm
index
418b815
..
b4ce84b
100644
(file)
--- 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-9
x]{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
) {