From 639489f48f5285ec7990a01b8e991719edf45af4 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 --- 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 79dd39190e..3db1d6b9c7 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 ); @@ -53,14 +51,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){ @@ -322,12 +315,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 $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) }; @@ -363,6 +350,7 @@ sub display_value { } return $display_value; } + sub reservestatushuman{ my ($val)=@_; my %hashhuman=( @@ -375,6 +363,7 @@ sub reservestatushuman{ ); $hashhuman{$val}; } + sub changeifreservestatus{ my ($val)=@_; ($val=~/reservestatus/ @@ -394,4 +383,3 @@ sub changeifreservestatus{ end } :$val); } -1; -- 2.39.5