|
Lines 16-21
use MARC::File::XML;
Link Here
|
| 16 |
use MARC::Record; |
16 |
use MARC::Record; |
| 17 |
use MARC::Batch; |
17 |
use MARC::Batch; |
| 18 |
use MARC::Charset; |
18 |
use MARC::Charset; |
|
|
19 |
use Encode; |
| 19 |
|
20 |
|
| 20 |
use Koha::Script; |
21 |
use Koha::Script; |
| 21 |
use C4::Context; |
22 |
use C4::Context; |
|
Lines 565-571
if ($logfile){
Link Here
|
| 565 |
} |
566 |
} |
| 566 |
if ($yamlfile) { |
567 |
if ($yamlfile) { |
| 567 |
open my $yamlfileout, q{>}, "$yamlfile" or die "cannot open $yamlfile \n"; |
568 |
open my $yamlfileout, q{>}, "$yamlfile" or die "cannot open $yamlfile \n"; |
| 568 |
print $yamlfileout YAML::XS::Dump($yamlhash); |
569 |
print $yamlfileout YAML::XS::Dump(Encode::decode_utf8($yamlhash)); |
| 569 |
} |
570 |
} |
| 570 |
exit 0; |
571 |
exit 0; |
| 571 |
|
572 |
|
|
Lines 633-639
sub get_heading_fields{
Link Here
|
| 633 |
if ($authtypes){ |
634 |
if ($authtypes){ |
| 634 |
$headingfields = YAML::XS::LoadFile($authtypes); |
635 |
$headingfields = YAML::XS::LoadFile($authtypes); |
| 635 |
$headingfields={C4::Context->preference('marcflavour')=>$headingfields}; |
636 |
$headingfields={C4::Context->preference('marcflavour')=>$headingfields}; |
| 636 |
$debug && warn YAML::XS::Dump($headingfields); |
637 |
$debug && warn YAML::XS::Dump(Encode::decode_utf8($headingfields)); |
| 637 |
} |
638 |
} |
| 638 |
unless ($headingfields){ |
639 |
unless ($headingfields){ |
| 639 |
$headingfields=$dbh->selectall_hashref("SELECT auth_tag_to_report, authtypecode from auth_types",'auth_tag_to_report',{Slice=>{}}); |
640 |
$headingfields=$dbh->selectall_hashref("SELECT auth_tag_to_report, authtypecode from auth_types",'auth_tag_to_report',{Slice=>{}}); |