From: Frédéric Demians Date: Sat, 3 Jul 2010 14:32:44 +0000 (+0200) Subject: Bug 4188 Valid PDF file name when printing basket group with no name X-Git-Tag: v3.02.00-rc~122 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=2e6f91dc71f249bbb4f703d424e0c0a20f711adb;p=koha_gimpoz Bug 4188 Valid PDF file name when printing basket group with no name Signed-off-by: Galen Charlton --- diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index a3b7dc940c..69de0990dc 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -238,7 +238,10 @@ sub printbasketgrouppdf{ } $orders{$basket->{basketno}}=\@ba_orders; } - print $input->header( -type => 'application/pdf', -attachment => $basketgroup->{name}.'.pdf' ); + print $input->header( + -type => 'application/pdf', + -attachment => ( $basketgroup->{name} || $basketgroupid ) . '.pdf' + ); my $pdf = printpdf($basketgroup, $bookseller, $baskets, \%orders, $bookseller->{gstrate} || C4::Context->preference("gist")) || die "pdf generation failed"; print $pdf; exit;