Lines 462-468
sub marcrecord2csv {
Link Here
|
462 |
# Separating the marcfields from the user-supplied headers |
462 |
# Separating the marcfields from the user-supplied headers |
463 |
my @csv_structures; |
463 |
my @csv_structures; |
464 |
foreach (@marcfieldsarray) { |
464 |
foreach (@marcfieldsarray) { |
465 |
my @result = split('=', $_); |
465 |
my @result = split('=', $_, 2); |
466 |
my $content = ( @result == 2 ) |
466 |
my $content = ( @result == 2 ) |
467 |
? $result[1] |
467 |
? $result[1] |
468 |
: $result[0]; |
468 |
: $result[0]; |
Lines 516-522
sub marcrecord2csv {
Link Here
|
516 |
my $tag = $tags->[0]; |
516 |
my $tag = $tags->[0]; |
517 |
if ( $tag->{subfieldtag} ) { |
517 |
if ( $tag->{subfieldtag} ) { |
518 |
my $query = "SELECT liblibrarian FROM marc_subfield_structure WHERE tagfield=? AND tagsubfield=?"; |
518 |
my $query = "SELECT liblibrarian FROM marc_subfield_structure WHERE tagfield=? AND tagsubfield=?"; |
519 |
my @results = $dbh->selectrow_array( $query, {}, $tag->{subfieldtag} ); |
519 |
my @results = $dbh->selectrow_array( $query, {}, $tag->{fieldtag}, $tag->{subfieldtag} ); |
520 |
push @marcfieldsheaders, $results[0]; |
520 |
push @marcfieldsheaders, $results[0]; |
521 |
} else { |
521 |
} else { |
522 |
my $query = "SELECT liblibrarian FROM marc_tag_structure WHERE tagfield=?"; |
522 |
my $query = "SELECT liblibrarian FROM marc_tag_structure WHERE tagfield=?"; |