From 202dafc63bf63784401f2d6154db80dd95c5e3ed Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 1 Jun 2026 15:20:49 +0200 Subject: [PATCH] Bug 42363: [24.11] Use C4::Context::csv_delimiter for delimiter validation (cherry picked from commit 710c20075396beaeee056efeec28fc95d10fbb1d) Signed-off-by: Fridolin Somers --- reports/catalogue_stats.pl | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index 6145b82d83..5414499069 100755 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -66,8 +66,8 @@ my $output = "screen"; my $output_input = $input->param("output"); my $basename = "Export"; my $basename_input = $input->param("basename"); -our $sep = C4::Context->csv_delimiter(); -my $sep_input = $input->param("sep"); + +our $sep = C4::Context->csv_delimiter( scalar $input->param("sep") ); my $item_itype; @@ -118,13 +118,6 @@ if ($basename_input) { } } -#NOTE: Validate sep parameter -my $delimiter_choices = GetDelimiterChoices(); -my %allowed_seps = map { $_ => 1 } @{ $delimiter_choices->{values} }; -if ( $sep_input && $allowed_seps{$sep_input} ) { - $sep = $sep_input; -} - if(C4::Context->preference('item-level_itypes')) { $item_itype = "items\.itype" } else {