From 5938fdddd91cf6fa83ffa42df796927237dfdc2f Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 8 Dec 2016 12:28:53 +0100 Subject: [PATCH] Bug 17931: Remove unused vars from reserves_stats Change to Modern::Perl. Remove null_to_zzempty and add a few blank lines between subs. Remove unused vars: $podsp, $type, $daysel, $monthsel and $mime. Removing trailing 1; Test plan: Run a few reports from reports/reserves_stats.pl Signed-off-by: Marcel de Rooy Signed-off-by: Emma Smith Signed-off-by: Jonathan Druart Wrongly pasted from reports/issues_stats.pl initially Signed-off-by: Kyle M Hall (cherry picked from commit 639489f48f5285ec7990a01b8e991719edf45af4) Signed-off-by: Katrin Fischer --- reports/reserves_stats.pl | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/reports/reserves_stats.pl b/reports/reserves_stats.pl index 9ffa2121cc..4723b4f57c 100755 --- a/reports/reserves_stats.pl +++ b/reports/reserves_stats.pl @@ -17,9 +17,7 @@ # Koha; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -use strict; -use warnings; +use Modern::Perl; use CGI qw ( -utf8 ); @@ -52,14 +50,9 @@ my $fullreportname = "reports/reserves_stats.tt"; my $do_it = $input->param('do_it'); my $line = $input->param("Line"); my $column = $input->param("Column"); -my $podsp = $input->param("DisplayBy"); -my $type = $input->param("PeriodTypeSel"); -my $daysel = $input->param("PeriodDaySel"); -my $monthsel = $input->param("PeriodMonthSel"); my $calc = $input->param("Cellvalue"); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); my $hash_params = $input->Vars; my $filter_hashref; foreach my $filter (grep {$_ =~/^filter/} keys %$hash_params){ @@ -326,12 +319,6 @@ sub calculate { return [(\%globalline)]; } -sub null_to_zzempty ($) { - my $string = shift; - defined($string) or return 'zzEMPTY'; - ($string eq "NULL") and return 'zzEMPTY'; - return $string; # else return the valid value -} sub display_value { my ( $crit, $value ) = @_; my $ccodes = GetKohaAuthorisedValues("items.ccode"); @@ -367,6 +354,7 @@ sub display_value { } return $display_value; } + sub reservestatushuman{ my ($val)=@_; my %hashhuman=( @@ -379,6 +367,7 @@ sub reservestatushuman{ ); $hashhuman{$val}; } + sub changeifreservestatus{ my ($val)=@_; ($val=~/reservestatus/ @@ -398,4 +387,3 @@ sub changeifreservestatus{ end } :$val); } -1; -- 2.39.5