From 95bf6fb012609f9e8a757759e6bf78b7a295b6e7 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 26 Mar 2012 16:49:12 +0200 Subject: [PATCH] Bug 7829 - reports/ remove all exit(1) for plack In Bug 7772 Ian correctly noted that reports have exit(1) all over the place. This is left over from old code, and this patch changes them to exit(0). I decided to use plain exit as opposed to explicit exit(0) since it produces cleaner code, but I'm welcoming suggestion on this. Signed-off-by: Alex Arnaud Signed-off-by: Paul Poulain --- reports/acquisitions_stats.pl | 2 +- reports/bor_issues_top.pl | 2 +- reports/borrowers_out.pl | 4 ++-- reports/borrowers_stats.pl | 2 +- reports/cat_issues_top.pl | 4 ++-- reports/catalogue_out.pl | 2 +- reports/catalogue_stats.pl | 4 ++-- reports/issues_avg_stats.pl | 4 ++-- reports/issues_stats.pl | 2 +- reports/reserves_stats.pl | 2 +- reports/serials_stats.pl | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl index ad0ac3fb50..7207e64670 100755 --- a/reports/acquisitions_stats.pl +++ b/reports/acquisitions_stats.pl @@ -108,7 +108,7 @@ if ($do_it) { } print $sep. @$results[0]->{total}; } - exit(1); + exit; } else { my $dbh = C4::Context->dbh; diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl index 126cdef8c5..6ad34955cf 100755 --- a/reports/bor_issues_top.pl +++ b/reports/bor_issues_top.pl @@ -102,7 +102,7 @@ if ($do_it) { print join($sep, map {$_->{totalcol}} @$cols); print $sep.@$results[0]->{total}; } - exit(0); + exit; } my $dbh = C4::Context->dbh; diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl index 278e412b48..722faba29e 100755 --- a/reports/borrowers_out.pl +++ b/reports/borrowers_out.pl @@ -69,7 +69,7 @@ if ($do_it) { # Printing results to screen $template->param(mainloop => $results); output_html_with_http_headers $input, $cookie, $template->output; - exit(1); + exit; } else { # Printing to a csv file print $input->header(-type => 'application/vnd.sun.xml.calc', @@ -103,7 +103,7 @@ if ($do_it) { print $sep.$col->{totalcol}; } print $sep.@$results[0]->{total}; - exit(1); + exit; } # Displaying choices } else { diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index c17a32683d..9e00ea3e94 100755 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -107,7 +107,7 @@ if ($do_it) { } print $sep.@$results[0]->{total}; } - exit(1); # exit after do_it, regardless + exit; # exit after do_it, regardless } else { my $dbh = C4::Context->dbh; my $req; diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl index 606106d2a4..2a6409d2c9 100755 --- a/reports/cat_issues_top.pl +++ b/reports/cat_issues_top.pl @@ -75,7 +75,7 @@ if ($do_it) { $template->param(mainloop => $results, limit => $limit); output_html_with_http_headers $input, $cookie, $template->output; - exit(1); + exit; } else { # Printing to a csv file print $input->header(-type => 'application/vnd.sun.xml.calc', @@ -108,7 +108,7 @@ if ($do_it) { print $sep.$col->{totalcol}; } print $sep.@$results[0]->{total}; - exit(1); + exit; } # Displaying choices } else { diff --git a/reports/catalogue_out.pl b/reports/catalogue_out.pl index 87990c1564..8a22a18f7a 100755 --- a/reports/catalogue_out.pl +++ b/reports/catalogue_out.pl @@ -96,7 +96,7 @@ if ($do_it) { } print $sep.@$results[0]->{total}; } - exit(1); # in either case, exit after do_it + exit; # in either case, exit after do_it } # Displaying choices (i.e., not do_it) diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index 11dff4d3cb..c8e21940f4 100755 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -74,7 +74,7 @@ if ($do_it) { if ($output eq "screen"){ $template->param(mainloop => $results); output_html_with_http_headers $input, $cookie, $template->output; - exit(1); + exit; } else { print $input->header(-type => 'application/vnd.sun.xml.calc', -encoding => 'utf-8', @@ -102,7 +102,7 @@ if ($do_it) { print $sep.$col->{totalcol}; } print $sep.@$results[0]->{total}; - exit(1); + exit; } } else { my $dbh = C4::Context->dbh; diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl index c6a3859100..372f3c0073 100755 --- a/reports/issues_avg_stats.pl +++ b/reports/issues_avg_stats.pl @@ -77,7 +77,7 @@ if ($do_it) { # Printing results to screen $template->param(mainloop => $results); output_html_with_http_headers $input, $cookie, $template->output; - exit(1); + exit; } else { # Printing to a csv file print $input->header(-type => 'application/vnd.sun.xml.calc', @@ -110,7 +110,7 @@ if ($do_it) { print $sep.$col->{totalcol}; } print $sep.@$results[0]->{total}; - exit(1); + exit; } # Displaying choices } else { diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 2f8a7e359f..4b6aa42541 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -123,7 +123,7 @@ if ($do_it) { print map {$sep.$_->{totalcol}} @$cols; print $sep.@$results[0]->{total}; } - exit(1); # exit either way after $do_it + exit; # exit either way after $do_it } my $dbh = C4::Context->dbh; diff --git a/reports/reserves_stats.pl b/reports/reserves_stats.pl index a2b3737174..c20a6760ba 100755 --- a/reports/reserves_stats.pl +++ b/reports/reserves_stats.pl @@ -130,7 +130,7 @@ if ($do_it) { print map {$sep.$_->{totalcol}} @$cols; print $sep.@$results[0]->{total}; } - exit(1); # exit either way after $do_it + exit; # exit either way after $do_it } my $dbh = C4::Context->dbh; diff --git a/reports/serials_stats.pl b/reports/serials_stats.pl index 88918ccade..ff80b2f51b 100755 --- a/reports/serials_stats.pl +++ b/reports/serials_stats.pl @@ -125,7 +125,7 @@ if($do_it){ print $item->{startdate}.$sep; print $item->{enddate}."\n"; } - exit(1); + exit; } }else{ ## We generate booksellers list -- 2.39.5