From 7408fa5d7087fad5c8f15b742b9624cbfe652a61 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 24 Jan 2014 12:49:39 +0100 Subject: [PATCH] Bug 8168: (follow-up) Use semicolon as default CSV delimiter installer/data/mysql/sysprefs.sql has semicolon as default. This fixes both instances to use the same fallback value. It also prevents CSV header info from being included in non-CSV messages. Signed-off-by: wajasu Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- misc/cronjobs/overdue_notices.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index a489f1f27d..7e83d45523 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -359,7 +359,7 @@ binmode( STDOUT, ':encoding(UTF-8)' ); our $csv; # the Text::CSV_XS object our $csv_fh; # the filehandle to the CSV file. if ( defined $csvfilename ) { - my $sep_char = C4::Context->preference('delimiter') || ','; + my $sep_char = C4::Context->preference('delimiter') || ';'; $sep_char = "\t" if ($sep_char eq 'tabulation'); $csv = Text::CSV_XS->new( { binary => 1 , sep_char => $sep_char } ); if ( $csvfilename eq '' ) { @@ -629,7 +629,7 @@ END_SQL # Generate the content of the csv with headers my $content; if ( defined $csvfilename ) { - my $delimiter = C4::Context->preference('delimiter') // ';'; + my $delimiter = C4::Context->preference('delimiter') || ';'; $content = join($delimiter, qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n"; } else { -- 2.39.5