Bug 5399: Follow up style patch, moving exits out of subroutine
authorChris Cormack <chrisc@catalyst.net.nz>
Mon, 17 Jan 2011 09:53:28 +0000 (22:53 +1300)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 17 Jan 2011 09:53:28 +0000 (22:53 +1300)
acqui/basketgroup.pl

index 0d5bcd5..2a35f3a 100755 (executable)
@@ -4,6 +4,7 @@
 #written by john.soros@biblibre.com 01/10/2008
 
 # Copyright 2008 - 2009 BibLibre SARL
+# Parts Copyright Catalyst 2010
 #
 # This file is part of Koha.
 #
@@ -245,7 +246,6 @@ sub printbasketgrouppdf{
     );
     my $pdf = printpdf($basketgroup, $bookseller, $baskets, \%orders, $bookseller->{gstrate} // C4::Context->preference("gist")) || die "pdf generation failed";
     print $pdf;
-    exit; # FIXME bad form to exit out of a subroutine like this
 }
 
 my $op = $input->param('op');
@@ -383,10 +383,12 @@ if ( $op eq "add" ) {
     CloseBasketgroup($basketgroupid);
     
     printbasketgrouppdf($basketgroupid);
+    exit;
 }elsif ($op eq 'print'){
     my $basketgroupid = $input->param('basketgroupid');
     
     printbasketgrouppdf($basketgroupid);
+    exit;
 }elsif( $op eq "delete"){
     my $basketgroupid = $input->param('basketgroupid');
     DelBasketgroup($basketgroupid);