From 3958e35017d6ee4bdac5b7caeb55cd67f0a1465f Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Thu, 4 May 2017 08:25:18 +0000 Subject: [PATCH] Bug 8612: QA followup - make header in CSV profile definition optional --- C4/Acquisition.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 754b156..7a70852 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -295,13 +295,13 @@ sub GetBasketAsCSV { my $csv_profile_content = $csv_profile->content; my ( @headers, @fields ); while ( $csv_profile_content =~ / - ([^=]+) # header - = - ([^\|]+) # fieldname (table.row or row) + ([^=\|]+) # header + =? + ([^\|]*) # fieldname (table.row or row) \|? /gxms ) { push @headers, $1; - my $field = $2; + my $field = ($2 eq '') ? $1 : $2; $field =~ s/[^\.]*\.{1}//; # Remove the table name if exists. push @fields, $field; } -- 2.1.4