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

(-)a/C4/Context.pm (+20 lines)
Lines 479-484 sub delete_preference { Link Here
479
    return 0;
479
    return 0;
480
}
480
}
481
481
482
=head2 csv_delimiter
483
484
    $delimiter = C4::Context->csv_delimiter;
485
486
    Returns prefered CSV delimiter, using system preference 'CSVDelimiter'.
487
    If this preference is missing or empty semicolon will be returned.
488
    This method is needed because of special behavior for tabulation.
489
490
    You can, optionally, pass a value parameter to this routine
491
    in the case of existing delimiter.
492
493
=cut
494
495
sub csv_delimiter {
496
    my ( $self, $value ) = @_;
497
    my $delimiter = $value || $self->preference('CSVDelimiter') || ';';
498
    $delimiter = "\t" if $delimiter eq 'tabulation';
499
    return $delimiter;
500
}
501
482
=head2 Zconn
502
=head2 Zconn
483
503
484
  $Zconn = C4::Context->Zconn
504
  $Zconn = C4::Context->Zconn
(-)a/Koha/Template/Plugin/Koha.pm (+16 lines)
Lines 55-60 sub Preference { Link Here
55
    return C4::Context->preference( $pref );
55
    return C4::Context->preference( $pref );
56
}
56
}
57
57
58
=head3 CSVDelimiter
59
60
The delimiter option 'tabs' is stored in the DB as 'tabulation' to avoid issues
61
storing special characters in the DB. This helper function translates the value
62
to the correct character when used in templates.
63
64
You can, optionally, pass a value parameter to this routine in the case of delimiter
65
being fetched in the scripts and still needing to be translated
66
67
=cut
68
69
sub CSVDelimiter {
70
    my ( $self, $val ) = @_;
71
    return C4::Context->csv_delimiter($val);
72
}
73
58
sub Version {
74
sub Version {
59
    my $version_string = Koha::version();
75
    my $version_string = Koha::version();
60
    my ( $major, $minor, $maintenance, $development ) = split( '\.', $version_string );
76
    my ( $major, $minor, $maintenance, $development ) = split( '\.', $version_string );
(-)a/admin/aqplan.pl (-2 / +2 lines)
Lines 97-103 my $show_actual = $input->param('show_actual'); Link Here
97
my $show_percent = $input->param('show_percent');
97
my $show_percent = $input->param('show_percent');
98
my $output       = $input->param("output") // q{};
98
my $output       = $input->param("output") // q{};
99
our $basename     = $input->param("basename");
99
our $basename     = $input->param("basename");
100
our $del          = $input->param("sep");
100
our $del          = C4::Context->csv_delimiter(scalar $input->param("sep"));
101
101
102
my $show_mine       = $input->param('show_mine') ;
102
my $show_mine       = $input->param('show_mine') ;
103
103
Lines 307-313 foreach my $n (@names) { Link Here
307
#         DEFAULT DISPLAY BEGINS
307
#         DEFAULT DISPLAY BEGINS
308
308
309
my $CGIextChoice = ( 'CSV' ); # FIXME translation
309
my $CGIextChoice = ( 'CSV' ); # FIXME translation
310
my $CGIsepChoice = ( C4::Context->preference("CSVDelimiter") );
310
my $CGIsepChoice = ( C4::Context->csv_delimiter );
311
311
312
my ( @budget_lines, %cell_hash );
312
my ( @budget_lines, %cell_hash );
313
313
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc (-1 / +1 lines)
Lines 6-12 Link Here
6
[%- USE AuthorisedValues -%]
6
[%- USE AuthorisedValues -%]
7
[%- SET biblio = item.biblio -%]
7
[%- SET biblio = item.biblio -%]
8
[%- SET biblioitem = item.biblioitem -%]
8
[%- SET biblioitem = item.biblioitem -%]
9
[%- SET delimiter = Koha.Preference( 'CSVDelimiter' ) || ',' -%]
9
[%- SET delimiter = Koha.CSVDelimiter() -%]
10
"[% biblio.title | replace('"', '""') | $raw %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author | replace('"', '""') | $raw %]"
10
"[% biblio.title | replace('"', '""') | $raw %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author | replace('"', '""') | $raw %]"
11
[%- delimiter | $raw -%]
11
[%- delimiter | $raw -%]
12
"[% (biblioitem.publicationyear || biblio.copyrightdate) | replace('"', '""') | $raw %]"
12
"[% (biblioitem.publicationyear || biblio.copyrightdate) | replace('"', '""') | $raw %]"
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt (-1 / +1 lines)
Lines 1-4 Link Here
1
[%- USE Koha -%]
1
[%- USE Koha -%]
2
[%- SET delimiter = Koha.Preference( 'CSVDelimiter' ) || ',' -%]
2
[%- SET delimiter = Koha.CSVDelimiter() -%]
3
3
4
[%- BLOCK -%]Contract name[% delimiter | html %]Order number[% delimiter | html %]Entry date[% delimiter | html %]ISBN[% delimiter | html %]Author[% delimiter | html %]Title[% delimiter | html %]Publication year[% delimiter | html %]Publisher[% delimiter | html %]Collection title[% delimiter | html %]Note for vendor[% delimiter | html %]Quantity[% delimiter | html %]RRP[% delimiter | html %]Delivery place[% delimiter | html %]Billing place[%- END -%]
4
[%- BLOCK -%]Contract name[% delimiter | html %]Order number[% delimiter | html %]Entry date[% delimiter | html %]ISBN[% delimiter | html %]Author[% delimiter | html %]Title[% delimiter | html %]Publication year[% delimiter | html %]Publisher[% delimiter | html %]Collection title[% delimiter | html %]Note for vendor[% delimiter | html %]Quantity[% delimiter | html %]RRP[% delimiter | html %]Delivery place[% delimiter | html %]Billing place[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt (-1 / +1 lines)
Lines 1-4 Link Here
1
[%- USE Koha -%]
1
[%- USE Koha -%]
2
[%- SET delimiter = Koha.Preference( 'CSVDelimiter' ) || ',' -%]
2
[%- SET delimiter = Koha.CSVDelimiter() -%]
3
3
4
[%- BLOCK -%]Account number[% delimiter | html %]Basket name[% delimiter | html %]Order number[% delimiter | html %]Author[% delimiter | html %]Title[% delimiter | html %]Publisher[% delimiter | html %]Publication year[% delimiter | html %]Collection title[% delimiter | html %]ISBN[% delimiter | html %]Quantity[% delimiter | html %]RRP tax included[% delimiter | html %]RRP tax excluded[% delimiter | html %]Discount[% delimiter | html %]Estimated cost tax included[% delimiter | html %]Estimated cost tax excluded[% delimiter | html %]Note for vendor[% delimiter | html %]Entry date[% delimiter | html %]Bookseller name[% delimiter | html %]Bookseller physical address[% delimiter | html %]Bookseller postal address[% delimiter | html %]Contract number[% delimiter | html %]Contract name[% delimiter | html %]Basket group delivery place[% delimiter | html %]Basket group billing place[% delimiter | html %]Basket delivery place[% delimiter | html %]Basket billing place[%- END -%]
4
[%- BLOCK -%]Account number[% delimiter | html %]Basket name[% delimiter | html %]Order number[% delimiter | html %]Author[% delimiter | html %]Title[% delimiter | html %]Publisher[% delimiter | html %]Publication year[% delimiter | html %]Collection title[% delimiter | html %]ISBN[% delimiter | html %]Quantity[% delimiter | html %]RRP tax included[% delimiter | html %]RRP tax excluded[% delimiter | html %]Discount[% delimiter | html %]Estimated cost tax included[% delimiter | html %]Estimated cost tax excluded[% delimiter | html %]Note for vendor[% delimiter | html %]Entry date[% delimiter | html %]Bookseller name[% delimiter | html %]Bookseller physical address[% delimiter | html %]Bookseller postal address[% delimiter | html %]Contract number[% delimiter | html %]Contract name[% delimiter | html %]Basket group delivery place[% delimiter | html %]Basket group billing place[% delimiter | html %]Basket delivery place[% delimiter | html %]Basket billing place[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/lateorders.tt (-1 / +1 lines)
Lines 1-4 Link Here
1
[%- USE Koha -%]
1
[%- USE Koha -%]
2
[%- SET delimiter = Koha.Preference('CSVDelimiter') || ',' -%]
2
[%- SET delimiter = Koha.CSVDelimiter() -%]
3
3
4
[%- BLOCK -%]ORDER DATE[%- delimiter | html -%]ESTIMATED DELIVERY DATE[%- delimiter | html -%]VENDOR[%- delimiter | html -%]INFORMATION[%- delimiter | html -%]TOTAL COST[%- delimiter | html -%]BASKET[%- delimiter | html -%]CLAIMS COUNT[%- delimiter | html -%]CLAIMED DATE[%- delimiter | html -%]INTERNAL NOTE[%- delimiter | html -%]VENDOR NOTE[%- delimiter | html -%]ISBN[%- END -%]
4
[%- BLOCK -%]ORDER DATE[%- delimiter | html -%]ESTIMATED DELIVERY DATE[%- delimiter | html -%]VENDOR[%- delimiter | html -%]INFORMATION[%- delimiter | html -%]TOTAL COST[%- delimiter | html -%]BASKET[%- delimiter | html -%]CLAIMS COUNT[%- delimiter | html -%]CLAIMED DATE[%- delimiter | html -%]INTERNAL NOTE[%- delimiter | html -%]VENDOR NOTE[%- delimiter | html -%]ISBN[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt (-1 / +1 lines)
Lines 1-6 Link Here
1
[%- USE raw -%]
1
[%- USE raw -%]
2
[%- USE Koha -%]
2
[%- USE Koha -%]
3
[%- SET delimiter = Koha.Preference('CSVDelimiter') || ',' -%]
3
[%- SET delimiter = Koha.CSVDelimiter() -%]
4
[%- BLOCK -%]
4
[%- BLOCK -%]
5
"Title"
5
"Title"
6
[%- delimiter | $raw -%]
6
[%- delimiter | $raw -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basket.tt (-1 / +1 lines)
Lines 1-5 Link Here
1
[%- USE Koha -%]
1
[%- USE Koha -%]
2
[%- SET delimiter = Koha.Preference( 'CSVDelimiter' ) || ',' -%]
2
[%- SET delimiter = Koha.CSVDelimiter() -%]
3
3
4
[%- INCLUDE csv_headers/acqui/basket.tt -%]
4
[%- INCLUDE csv_headers/acqui/basket.tt -%]
5
[%- INCLUDE empty_line.inc -%]
5
[%- INCLUDE empty_line.inc -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/basketgroup.tt (-1 / +1 lines)
Lines 1-5 Link Here
1
[%- USE Koha -%]
1
[%- USE Koha -%]
2
[%- SET delimiter = Koha.Preference( 'CSVDelimiter' ) || ',' -%]
2
[%- SET delimiter = Koha.CSVDelimiter() -%]
3
3
4
[%- USE Price -%]
4
[%- USE Price -%]
5
[%- INCLUDE csv_headers/acqui/basketgroup.tt -%]
5
[%- INCLUDE csv_headers/acqui/basketgroup.tt -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/csv/lateorders.tt (-1 / +1 lines)
Lines 1-5 Link Here
1
[%- USE Koha -%]
1
[%- USE Koha -%]
2
[%- SET delimiter = Koha.Preference( 'CSVDelimiter' ) || ',' -%]
2
[%- SET delimiter = Koha.CSVDelimiter() -%]
3
3
4
[%- USE KohaDates -%]
4
[%- USE KohaDates -%]
5
[%- INCLUDE csv_headers/acqui/lateorders.tt -%]
5
[%- INCLUDE csv_headers/acqui/lateorders.tt -%]
(-)a/misc/cronjobs/overdue_notices.pl (-3 / +2 lines)
Lines 404-411 binmode( STDOUT, ':encoding(UTF-8)' ); Link Here
404
our $csv;       # the Text::CSV_XS object
404
our $csv;       # the Text::CSV_XS object
405
our $csv_fh;    # the filehandle to the CSV file.
405
our $csv_fh;    # the filehandle to the CSV file.
406
if ( defined $csvfilename ) {
406
if ( defined $csvfilename ) {
407
    my $sep_char = C4::Context->preference('CSVDelimiter') || ';';
407
    my $sep_char = C4::Context->csv_delimiter;
408
    $sep_char = "\t" if ($sep_char eq 'tabulation');
409
    $csv = Text::CSV_XS->new( { binary => 1 , sep_char => $sep_char } );
408
    $csv = Text::CSV_XS->new( { binary => 1 , sep_char => $sep_char } );
410
    if ( $csvfilename eq '' ) {
409
    if ( $csvfilename eq '' ) {
411
        $csv_fh = *STDOUT;
410
        $csv_fh = *STDOUT;
Lines 833-839 END_SQL Link Here
833
        # Generate the content of the csv with headers
832
        # Generate the content of the csv with headers
834
        my $content;
833
        my $content;
835
        if ( defined $csvfilename ) {
834
        if ( defined $csvfilename ) {
836
            my $delimiter = C4::Context->preference('CSVDelimiter') || ';';
835
            my $delimiter = C4::Context->csv_delimiter;
837
            $content = join($delimiter, qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n";
836
            $content = join($delimiter, qw(title name surname address1 address2 zipcode city country email itemcount itemsinfo due_date issue_date)) . "\n";
838
        }
837
        }
839
        else {
838
        else {
(-)a/misc/export_borrowers.pl (-2 / +1 lines)
Lines 91-98 my $sth = $dbh->prepare($query); Link Here
91
$sth->execute;
91
$sth->execute;
92
92
93
unless ( $separator ) {
93
unless ( $separator ) {
94
    $separator = C4::Context->preference('CSVDelimiter') || ',';
94
    $separator = C4::Context->csv_delimiter;
95
    $separator = "\t" if ($separator eq 'tabulation');
96
}
95
}
97
96
98
my $csv = Text::CSV->new( { sep_char => $separator, binary => 1 } );
97
my $csv = Text::CSV->new( { sep_char => $separator, binary => 1 } );
(-)a/reports/acquisitions_stats.pl (-2 / +1 lines)
Lines 69-76 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
69
    }
69
    }
70
);
70
);
71
71
72
our $sep     = $input->param("sep") // '';
72
our $sep = C4::Context->csv_delimiter(scalar $input->param("sep"));
73
$sep = "\t" if ($sep eq 'tabulation');
74
73
75
$template->param(
74
$template->param(
76
    do_it                    => $do_it,
75
    do_it                    => $do_it,
(-)a/reports/bor_issues_top.pl (-2 / +1 lines)
Lines 54-61 my ($template, $borrowernumber, $cookie) Link Here
54
                type => "intranet",
54
                type => "intranet",
55
                flagsrequired => {reports => '*'},
55
                flagsrequired => {reports => '*'},
56
                });
56
                });
57
our $sep     = $input->param("sep") || C4::Context->preference('CSVDelimiter') || ',';
57
our $sep = C4::Context->csv_delimiter(scalar $input->param("sep"));
58
$sep = "\t" if ($sep eq 'tabulation');
59
$template->param(do_it => $do_it,
58
$template->param(do_it => $do_it,
60
        );
59
        );
61
if ($do_it) {
60
if ($do_it) {
(-)a/reports/borrowers_out.pl (-2 / +1 lines)
Lines 49-56 $filters[1] = eval { output_pref( { dt => dt_from_string( $filters[1]), dateonly Link Here
49
49
50
my $output = $input->param("output");
50
my $output = $input->param("output");
51
my $basename = $input->param("basename");
51
my $basename = $input->param("basename");
52
our $sep     = $input->param("sep") || '';
52
our $sep     = C4::Context->csv_delimiter(scalar $input->param("sep"));
53
$sep = "\t" if ($sep eq 'tabulation');
54
my ($template, $borrowernumber, $cookie)
53
my ($template, $borrowernumber, $cookie)
55
    = get_template_and_user({template_name => $fullreportname,
54
    = get_template_and_user({template_name => $fullreportname,
56
                query => $input,
55
                query => $input,
(-)a/reports/borrowers_stats.pl (-2 / +1 lines)
Lines 58-65 my $borstat = $input->param("status"); Link Here
58
my $borstat1 = $input->param("activity");
58
my $borstat1 = $input->param("activity");
59
my $output = $input->param("output");
59
my $output = $input->param("output");
60
my $basename = $input->param("basename");
60
my $basename = $input->param("basename");
61
our $sep     = $input->param("sep");
61
our $sep     = C4::Context->csv_delimiter(scalar $input->param("sep"));
62
$sep = "\t" if ($sep and $sep eq 'tabulation');
63
62
64
my ($template, $borrowernumber, $cookie)
63
my ($template, $borrowernumber, $cookie)
65
	= get_template_and_user({template_name => $fullreportname,
64
	= get_template_and_user({template_name => $fullreportname,
(-)a/reports/cash_register_stats.pl (-1 / +1 lines)
Lines 157-163 if ($do_it) { Link Here
157
        my $format = 'csv';
157
        my $format = 'csv';
158
        my $reportname = $input->param('basename');
158
        my $reportname = $input->param('basename');
159
        my $reportfilename = $reportname ? "$reportname.$format" : "reportresults.$format" ;
159
        my $reportfilename = $reportname ? "$reportname.$format" : "reportresults.$format" ;
160
        my $delimiter = C4::Context->preference('CSVDelimiter') || ',';
160
        my $delimiter = C4::Context->csv_delimiter;
161
            my @rows;
161
            my @rows;
162
            foreach my $row (@loopresult) {
162
            foreach my $row (@loopresult) {
163
                my @rowValues;
163
                my @rowValues;
(-)a/reports/cat_issues_top.pl (-2 / +1 lines)
Lines 55-62 my ($template, $borrowernumber, $cookie) Link Here
55
                type => "intranet",
55
                type => "intranet",
56
                flagsrequired => { reports => '*'},
56
                flagsrequired => { reports => '*'},
57
                });
57
                });
58
our $sep     = $input->param("sep");
58
our $sep     = C4::Context->csv_delimiter(scalar $input->param("sep"));
59
$sep = "\t" if ($sep eq 'tabulation');
60
$template->param(do_it => $do_it,
59
$template->param(do_it => $do_it,
61
        );
60
        );
62
if ($do_it) {
61
if ($do_it) {
(-)a/reports/catalogue_stats.pl (-2 / +1 lines)
Lines 50-57 my @filters = $input->multi_param("Filter"); Link Here
50
my $cotedigits  = $input->param("cotedigits");
50
my $cotedigits  = $input->param("cotedigits");
51
my $output      = $input->param("output");
51
my $output      = $input->param("output");
52
my $basename    = $input->param("basename");
52
my $basename    = $input->param("basename");
53
our $sep        = $input->param("sep");
53
our $sep        = C4::Context->csv_delimiter(scalar $input->param("sep"));
54
$sep = "\t" if ($sep eq 'tabulation');
55
my $item_itype;
54
my $item_itype;
56
if(C4::Context->preference('item-level_itypes')) {
55
if(C4::Context->preference('item-level_itypes')) {
57
	$item_itype = "items\.itype"
56
	$item_itype = "items\.itype"
(-)a/reports/guided_reports.pl (-2 / +1 lines)
Lines 931-939 elsif ($phase eq 'Export'){ Link Here
931
                $content .= join("\t", map { $_ // '' } @$row) . "\n";
931
                $content .= join("\t", map { $_ // '' } @$row) . "\n";
932
            }
932
            }
933
        } else {
933
        } else {
934
            my $delimiter = C4::Context->preference('CSVDelimiter') || ',';
935
            if ( $format eq 'csv' ) {
934
            if ( $format eq 'csv' ) {
936
                $delimiter = "\t" if $delimiter eq 'tabulation';
935
                my $delimiter = C4::Context->csv_delimiter;
937
                $type = 'application/csv';
936
                $type = 'application/csv';
938
                my $csv = Text::CSV::Encoded->new({ encoding_out => 'UTF-8', sep_char => $delimiter});
937
                my $csv = Text::CSV::Encoded->new({ encoding_out => 'UTF-8', sep_char => $delimiter});
939
                $csv or die "Text::CSV::Encoded->new({binary => 1}) FAILED: " . Text::CSV::Encoded->error_diag();
938
                $csv or die "Text::CSV::Encoded->new({binary => 1}) FAILED: " . Text::CSV::Encoded->error_diag();
(-)a/reports/issues_avg_stats.pl (-2 / +1 lines)
Lines 66-73 my ($template, $borrowernumber, $cookie) Link Here
66
                type => "intranet",
66
                type => "intranet",
67
                flagsrequired => {reports => '*'},
67
                flagsrequired => {reports => '*'},
68
                    });
68
                    });
69
our $sep     = $input->param("sep");
69
our $sep = C4::Context->csv_delimiter(scalar $input->param("sep"));
70
$sep = "\t" if ($sep eq 'tabulation');
71
$template->param(do_it => $do_it,
70
$template->param(do_it => $do_it,
72
    );
71
    );
73
if ($do_it) {
72
if ($do_it) {
(-)a/reports/issues_stats.pl (-2 / +1 lines)
Lines 75-82 my ($template, $borrowernumber, $cookie) = get_template_and_user({ Link Here
75
	type => "intranet",
75
	type => "intranet",
76
	flagsrequired => {reports => '*'},
76
	flagsrequired => {reports => '*'},
77
});
77
});
78
our $sep     = $input->param("sep") // ';';
78
our $sep = C4::Context->csv_delimiter(scalar $input->param("sep"));
79
$sep = "\t" if ($sep eq 'tabulation');
80
$template->param(do_it => $do_it,
79
$template->param(do_it => $do_it,
81
);
80
);
82
81
(-)a/reports/orders_by_fund.pl (-2 / +2 lines)
Lines 32-37 use C4::Auth qw( get_template_and_user ); Link Here
32
use C4::Output qw( output_html_with_http_headers );
32
use C4::Output qw( output_html_with_http_headers );
33
use C4::Budgets qw( GetBudgetsReport GetBudgetHierarchy );
33
use C4::Budgets qw( GetBudgetsReport GetBudgetHierarchy );
34
use C4::Acquisition qw( GetBasket get_rounded_price );
34
use C4::Acquisition qw( GetBasket get_rounded_price );
35
use C4::Context;
35
use Koha::Biblios;
36
use Koha::Biblios;
36
use Koha::DateUtils qw( dt_from_string output_pref );
37
use Koha::DateUtils qw( dt_from_string output_pref );
37
38
Lines 131-138 if ( $get_orders ) { Link Here
131
    # If we are outputting to a file, create it and exit.
132
    # If we are outputting to a file, create it and exit.
132
    else {
133
    else {
133
        my $basename = $params->{"basename"};
134
        my $basename = $params->{"basename"};
134
        my $sep = $params->{"sep"};
135
        my $sep = C4::Context->csv_delimiter(scalar $params->{"sep"});
135
        $sep = "\t" if ($sep eq 'tabulation');
136
136
137
        # TODO Use Text::CSV to generate the CSV file
137
        # TODO Use Text::CSV to generate the CSV file
138
        print $query->header(
138
        print $query->header(
(-)a/reports/reserves_stats.pl (-2 / +1 lines)
Lines 65-72 my ($template, $borrowernumber, $cookie) = get_template_and_user({ Link Here
65
	type => "intranet",
65
	type => "intranet",
66
	flagsrequired => {reports => '*'},
66
	flagsrequired => {reports => '*'},
67
});
67
});
68
our $sep     = $input->param("sep") || '';
68
our $sep = C4::Context->csv_delimiter(scalar $input->param("sep"));
69
$sep = "\t" if ($sep eq 'tabulation');
70
$template->param(do_it => $do_it,
69
$template->param(do_it => $do_it,
71
);
70
);
72
71
(-)a/reports/serials_stats.pl (-2 / +1 lines)
Lines 42-49 my $expired = $input->param("expired"); Link Here
42
my $order      = $input->param("order");
42
my $order      = $input->param("order");
43
my $output     = $input->param("output");
43
my $output     = $input->param("output");
44
my $basename   = $input->param("basename");
44
my $basename   = $input->param("basename");
45
our $sep       = $input->param("sep") || '';
45
our $sep       = C4::Context->csv_delimiter(scalar $input->param("sep"));
46
$sep = "\t" if ($sep eq 'tabulation');
47
46
48
my ($template, $borrowernumber, $cookie)
47
my ($template, $borrowernumber, $cookie)
49
	= get_template_and_user({template_name => $templatename,
48
	= get_template_and_user({template_name => $templatename,
(-)a/tools/viewlog.pl (-2 / +1 lines)
Lines 229-236 if ($do_it) { Link Here
229
229
230
        # Printing to a csv file
230
        # Printing to a csv file
231
        my $content = q{};
231
        my $content = q{};
232
        my $delimiter = C4::Context->preference('CSVDelimiter') || ',';
233
        if (@data) {
232
        if (@data) {
233
            my $delimiter = C4::Context->csv_delimiter;
234
            my $csv = Text::CSV::Encoded->new( { encoding_out => 'utf8', sep_char => $delimiter } );
234
            my $csv = Text::CSV::Encoded->new( { encoding_out => 'utf8', sep_char => $delimiter } );
235
            $csv or die "Text::CSV::Encoded->new FAILED: " . Text::CSV::Encoded->error_diag();
235
            $csv or die "Text::CSV::Encoded->new FAILED: " . Text::CSV::Encoded->error_diag();
236
236
237
- 

Return to bug 28327