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