# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use warnings;
+
use C4::Context;
use C4::Koha;
use C4::Biblio;
my ($title, $author, $isbn, $issn) = _parse_biblio_fields($marc_record);
my $dbh = C4::Context->dbh;
# FIXME no controlnumber, originalsource
- # FIXME 2 - should regularize normalization of ISBN wherever it is done
- $isbn =~ s/\(.*$//;
- $isbn =~ tr/ -_//;
- $isbn = uc $isbn;
+ $isbn = C4::Koha::_isbn_cleanup($isbn); # FIXME C4::Koha::_isbn_cleanup should be made public
my $sth = $dbh->prepare("INSERT INTO import_biblios (import_record_id, title, author, isbn, issn) VALUES (?, ?, ?, ?, ?)");
$sth->execute($import_record_id, $title, $author, $isbn, $issn);
$sth->finish();
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use warnings;
+
use C4::Context;
use MARC::Record;
use C4::Search;
# FIXME - default normalizer
sub _normalize {
my $value = uc shift;
- $value =~ s/.;:,\]\[\)\(\/'"//g;
+ $value =~ s/[.;:,\]\[\)\(\/'"]//g;
$value =~ s/^\s+//;
#$value =~ s/^\s+$//;
$value =~ s/\s+$//;