X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=misc%2FbatchRebuildBiblioTables.pl;h=5db801bbc10d15512b6155d05948c08c7e5a18a3;hb=e678098109187e8d76d8567396f622886904fffc;hp=ae4f54eab28fd374d8de3d3c06ffcf2fdde69437;hpb=aef1dd15fbe37a8a9c30ba4b38f7ecd6c1fea54d;p=koha.git diff --git a/misc/batchRebuildBiblioTables.pl b/misc/batchRebuildBiblioTables.pl index ae4f54eab2..5db801bbc1 100755 --- a/misc/batchRebuildBiblioTables.pl +++ b/misc/batchRebuildBiblioTables.pl @@ -53,7 +53,7 @@ $starttime = gettimeofday; #1st of all, find item MARC tag. my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.itemnumber",''); -# $dbh->do("lock tables biblio write, biblioitems write, items write, marc_biblio write, marc_subfield_table write, marc_blob_subfield write, marc_word write, marc_subfield_structure write, stopwords write"); +# $dbh->do("lock tables biblio write, biblioitems write, items write, marc_biblio write, marc_subfield_table write, marc_blob_subfield write, marc_word write, marc_subfield_structure write"); my $sth = $dbh->prepare("SELECT biblionumber FROM biblio"); $sth->execute; # my ($biblionumbermax) = $sth->fetchrow; @@ -61,7 +61,7 @@ $sth->execute; 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); + my $record = GetMarcBiblio({ biblionumber => $biblionumber }); if (not defined $record) { push @errors, $biblionumber; next; @@ -96,7 +96,7 @@ if (scalar(@errors) > 0) { sub localNEWmodbiblio { my ($dbh,$record,$biblionumber,$frameworkcode) =@_; $frameworkcode="" unless $frameworkcode; - my $oldbiblio = TransformMarcToKoha($dbh,$record,$frameworkcode); + my $oldbiblio = TransformMarcToKoha($record,$frameworkcode); C4::Biblio::_koha_modify_biblio( $dbh, $oldbiblio, $frameworkcode ); C4::Biblio::_koha_modify_biblioitem_nonmarc( $dbh, $oldbiblio ); return 1;