X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=misc%2FbatchRebuildBiblioTables.pl;h=ae4f54eab28fd374d8de3d3c06ffcf2fdde69437;hb=7847f868fe35707f5225ff384af8cfd8559c4961;hp=b15a91ade748d8cf7ce006ba4a2e2a393f17a668;hpb=5e0b850d49f452ffbca41f47dc190d6d4f2323c7;p=koha_gimpoz diff --git a/misc/batchRebuildBiblioTables.pl b/misc/batchRebuildBiblioTables.pl index b15a91ade7..ae4f54eab2 100755 --- a/misc/batchRebuildBiblioTables.pl +++ b/misc/batchRebuildBiblioTables.pl @@ -58,9 +58,14 @@ my $sth = $dbh->prepare("SELECT biblionumber FROM biblio"); $sth->execute; # my ($biblionumbermax) = $sth->fetchrow; # warn "$biblionumbermax <<=="; +my @errors; while (my ($biblionumber)= $sth->fetchrow) { #now, parse the record, extract the item fields, and store them in somewhere else. my $record = GetMarcBiblio($biblionumber); + if (not defined $record) { + push @errors, $biblionumber; + next; + } my @fields = $record->field($tagfield); my @items; my $nbitems=0; @@ -82,6 +87,9 @@ while (my ($biblionumber)= $sth->fetchrow) { # $dbh->do("unlock tables"); my $timeneeded = time() - $starttime; print "$i MARC record done in $timeneeded seconds\n"; +if (scalar(@errors) > 0) { + print "Some biblionumber could not be processed though: ", join(" ", @errors); +} # modified NEWmodbiblio to jump the MARC part of the biblio modif # highly faster