Bugzilla – Attachment 147181 Details for
Bug 33045
Use process_tt in C4::Record::marcrecord2csv
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33045: Use process_tt in C4::Record::marcrecord2csv
Bug-33045-Use-processtt-in-C4Recordmarcrecord2csv.patch (text/plain), 1.49 KB, created by
Kyle M Hall (khall)
on 2023-02-22 19:49:04 UTC
(
hide
)
Description:
Bug 33045: Use process_tt in C4::Record::marcrecord2csv
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-02-22 19:49:04 UTC
Size:
1.49 KB
patch
obsolete
>From 12c6ff8f4acd5f1f8c394cb059c7e6663d16f7c2 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Wed, 22 Feb 2023 13:16:35 -0500 >Subject: [PATCH] Bug 33045: Use process_tt in C4::Record::marcrecord2csv > >Bug 33030 implements a new helper subroutine to standardize processing of Template Toolkit syntax outside slips and notices. We should use this subroutine in marcrecord2csv. > >Test Plan: >1) Apply this patch >2) prove t/db_dependent/Record/marcrecord2csv.t >--- > C4/Record.pm | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > >diff --git a/C4/Record.pm b/C4/Record.pm >index 69a60f3520..9f0d21c491 100644 >--- a/C4/Record.pm >+++ b/C4/Record.pm >@@ -38,6 +38,7 @@ use Koha::SimpleMARC qw( read_field ); > use Koha::XSLT::Base; > use Koha::CsvProfiles; > use Koha::AuthorisedValues; >+use Koha::TemplateUtils qw( process_tt ); > use Carp qw( carp croak ); > > use vars qw(@ISA @EXPORT); >@@ -564,13 +565,10 @@ sub marcrecord2csv { > > # TT tags exist > if ( $content =~ m|\[\%.*\%\]| ) { >- my $tt = Template->new(); >- my $template = $content; > # Replace 00X and 0XX with X or XX > $content =~ s|fields.00(\d)|fields.$1|g; > $content =~ s|fields.0(\d{2})|fields.$1|g; >- my $tt_output; >- $tt->process( \$content, $field_list, \$tt_output ); >+ my $tt_output = process_tt( $content, $field_list ); > push @csv_rows, $tt_output; > } else { > for my $tag ( @$tags ) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33045
:
147181
|
150493
|
155652
|
155653