Lines 492-498
sub add_matcher_list {
Link Here
|
492 |
sub get_infos_syspref { |
492 |
sub get_infos_syspref { |
493 |
my ($record, $field_list) = @_; |
493 |
my ($record, $field_list) = @_; |
494 |
my $syspref = C4::Context->preference('MarcFieldsToOrder'); |
494 |
my $syspref = C4::Context->preference('MarcFieldsToOrder'); |
495 |
my $yaml = YAML::Load($syspref); |
495 |
$syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt |
|
|
496 |
my $yaml = eval { |
497 |
YAML::Load($syspref); |
498 |
}; |
499 |
if ( $@ ) { |
500 |
warn "Unable to parse MarcFieldsToOrder syspref : $@"; |
501 |
return (); |
502 |
} |
496 |
my $r; |
503 |
my $r; |
497 |
for my $field_name ( @$field_list ) { |
504 |
for my $field_name ( @$field_list ) { |
498 |
my @fields = split /\|/, $yaml->{$field_name}; |
505 |
my @fields = split /\|/, $yaml->{$field_name}; |