View | Details | Raw Unified | Return to bug 4305
Collapse All | Expand All

(-)a/C4/Installer/PerlDependencies.pm (+5 lines)
Lines 464-469 our $PERL_DEPS = { Link Here
464
        'required' => '0',
464
        'required' => '0',
465
        'min_ver'  => '0.97',
465
        'min_ver'  => '0.97',
466
    },
466
    },
467
    'Business::ISBN' => {
468
        'usage'    => 'Core',
469
        'required' => '0',
470
        'min_ver'  => '2.05',
471
    },
467
};
472
};
468
473
469
1;
474
1;
(-)a/C4/Koha.pm (-13 / +8 lines)
Lines 24-29 use C4::Context; Link Here
24
use C4::Output;
24
use C4::Output;
25
use URI::Split qw(uri_split);
25
use URI::Split qw(uri_split);
26
use Memoize;
26
use Memoize;
27
use Business::ISBN;
27
28
28
use vars qw($VERSION @ISA @EXPORT $DEBUG);
29
use vars qw($VERSION @ISA @EXPORT $DEBUG);
29
30
Lines 1235-1240 sub GetNormalizedUPC { Link Here
1235
}
1236
}
1236
1237
1237
# Normalizes and returns the first valid ISBN found in the record
1238
# Normalizes and returns the first valid ISBN found in the record
1239
# ISBN13 are converted into ISBN10. This is required to get Amazon cover book.
1238
sub GetNormalizedISBN {
1240
sub GetNormalizedISBN {
1239
    my ($isbn,$record,$marcflavour) = @_;
1241
    my ($isbn,$record,$marcflavour) = @_;
1240
    my @fields;
1242
    my @fields;
Lines 1321-1339 sub _normalize_match_point { Link Here
1321
}
1323
}
1322
1324
1323
sub _isbn_cleanup ($) {
1325
sub _isbn_cleanup ($) {
1324
    my $normalized_isbn = shift;
1326
    my $isbn = Business::ISBN->new( shift );
1325
    $normalized_isbn =~ s/-//g;
1327
    return undef unless $isbn;
1326
    $normalized_isbn =~/([0-9x]{1,})/i;
1328
    $isbn = $isbn->as_isbn10 if $isbn->type eq 'ISBN13';
1327
    $normalized_isbn = $1;
1329
    $isbn = $isbn->as_string;
1328
    if (
1330
    $isbn =~ s/-//g;
1329
        $normalized_isbn =~ /\b(\d{13})\b/ or
1331
    return $isbn;
1330
        $normalized_isbn =~ /\b(\d{12})\b/i or
1331
        $normalized_isbn =~ /\b(\d{10})\b/ or
1332
        $normalized_isbn =~ /\b(\d{9}X)\b/i
1333
    ) { 
1334
        return $1;
1335
    }
1336
    return undef;
1337
}
1332
}
1338
1333
1339
1;
1334
1;
(-)a/install_misc/apt-get-debian-lenny.sh (-1 / +1 lines)
Lines 12-17 idzebra-2.0 \ Link Here
12
idzebra-2.0-utils \
12
idzebra-2.0-utils \
13
libalgorithm-checkdigits-perl \
13
libalgorithm-checkdigits-perl \
14
libbiblio-endnotestyle-perl \
14
libbiblio-endnotestyle-perl \
15
libbusiness-isbn-perl \
15
libcgi-session-perl \
16
libcgi-session-perl \
16
libcgi-session-serialize-yaml-perl \
17
libcgi-session-serialize-yaml-perl \
17
libclass-accessor-perl \
18
libclass-accessor-perl \
18
- 

Return to bug 4305