eval { require "$FindBin::Bin/kohalib.pl" };
}
+use Koha::Script;
use C4::Context;
use C4::Biblio;
use Getopt::Long;
return;
}
+ my $frameworkcode = GetFrameworkCode($biblionumber);
+
my ( $headings_changed, $results ) =
- LinkBibHeadingsToAuthorities( $linker, $bib,
- GetFrameworkCode($biblionumber) );
+ LinkBibHeadingsToAuthorities( $linker, $bib, $frameworkcode );
foreach my $key ( keys %{ $results->{'unlinked'} } ) {
$unlinked_headings{$key} += $results->{'unlinked'}->{$key};
}
if ($headings_changed) {
if ($verbose) {
my $title = substr( $bib->title, 0, 20 );
- print
-"Bib $biblionumber ($title): $headings_changed headings changed\n";
+ printf(
+ "Bib %12d (%-20s): %3d headings changed\n",
+ $biblionumber,
+ $title,
+ $headings_changed
+ );
}
if ( not $test_only ) {
- ModBiblio( $bib, $biblionumber, GetFrameworkCode($biblionumber) );
+ ModBiblio( $bib, $biblionumber, $frameworkcode, 1 );
+ #Last param is to note ModBiblio was called from linking script and bib should not be linked again
$num_bibs_modified++;
}
}