Bug 25624: Add --where option to update_patrons_category.pl
[srvgit] / misc / link_bibs_to_authorities.pl
index 2711d16..9044292 100755 (executable)
@@ -11,6 +11,7 @@ BEGIN {
     eval { require "$FindBin::Bin/kohalib.pl" };
 }
 
+use Koha::Script;
 use C4::Context;
 use C4::Biblio;
 use Getopt::Long;
@@ -46,7 +47,7 @@ my $result = GetOptions(
     'h|help'         => \$want_help
 );
 
-binmode( STDOUT, ":utf8" );
+binmode( STDOUT, ":encoding(UTF-8)" );
 
 if ( not $result or $want_help ) {
     usage();
@@ -220,7 +221,8 @@ sub process_bib {
             );
         }
         if ( not $test_only ) {
-            ModBiblio( $bib, $biblionumber, $frameworkcode );
+            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++;
         }
     }