View | Details | Raw Unified | Return to bug 33045
Collapse All | Expand All

(-)a/C4/Record.pm (-5 / +2 lines)
Lines 38-43 use Koha::SimpleMARC qw( read_field ); Link Here
38
use Koha::XSLT::Base;
38
use Koha::XSLT::Base;
39
use Koha::CsvProfiles;
39
use Koha::CsvProfiles;
40
use Koha::AuthorisedValues;
40
use Koha::AuthorisedValues;
41
use Koha::TemplateUtils qw( process_tt );
41
use Carp qw( carp croak );
42
use Carp qw( carp croak );
42
43
43
use vars qw(@ISA @EXPORT);
44
use vars qw(@ISA @EXPORT);
Lines 564-576 sub marcrecord2csv { Link Here
564
565
565
        # TT tags exist
566
        # TT tags exist
566
        if ( $content =~ m|\[\%.*\%\]| ) {
567
        if ( $content =~ m|\[\%.*\%\]| ) {
567
            my $tt = Template->new();
568
            my $template = $content;
569
            # Replace 00X and 0XX with X or XX
568
            # Replace 00X and 0XX with X or XX
570
            $content =~ s|fields.00(\d)|fields.$1|g;
569
            $content =~ s|fields.00(\d)|fields.$1|g;
571
            $content =~ s|fields.0(\d{2})|fields.$1|g;
570
            $content =~ s|fields.0(\d{2})|fields.$1|g;
572
            my $tt_output;
571
            my $tt_output = process_tt( $content, $field_list );
573
            $tt->process( \$content, $field_list, \$tt_output );
574
            push @csv_rows, $tt_output;
572
            push @csv_rows, $tt_output;
575
        } else {
573
        } else {
576
            for my $tag ( @$tags ) {
574
            for my $tag ( @$tags ) {
577
- 

Return to bug 33045