[Koha-patches] [PATCH] Bug 4188 Valid PDF file name when printing basket group with no name

Frédéric Demians f.demians at tamil.fr
Sat Jul 3 16:32:44 CEST 2010


---
 acqui/basketgroup.pl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl
index a3b7dc9..69de099 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;
-- 
1.7.1



More information about the Koha-patches mailing list