Bug 7251 : Corrects a problem in overdue_notices.pl when delimiter is set to tabulation
authorFrédérick Capovilla <frederick.capovilla@libeo.com>
Mon, 21 Nov 2011 17:28:25 +0000 (12:28 -0500)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 6 Dec 2011 16:12:37 +0000 (17:12 +0100)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
checked that others values for the separator are OK = it is (space, semicolon,... see syspref "delimiter")

misc/cronjobs/overdue_notices.pl

index 5347f69..21e7dc3 100755 (executable)
@@ -330,6 +330,7 @@ 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') || ',';
+    $sep_char = "\t" if ($sep_char eq 'tabulation');
     $csv = Text::CSV_XS->new( { binary => 1 , sep_char => $sep_char } );
     if ( $csvfilename eq '' ) {
         $csv_fh = *STDOUT;