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