X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=acqui%2Fbasketgroup.pl;h=5dbae17963df499c610b36b08bf49dc940ccfbb6;hb=481f620455d40f93a3cb37136ef2c3964497751e;hp=084660393307e696b44af4f29c6c5fa2fcf13b47;hpb=552cde08db9e237de631af7e3acc774154b265a2;p=koha_gimpoz diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 0846603933..5dbae17963 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -45,6 +45,7 @@ The bookseller who we want to display the baskets (and basketgroups) of. use strict; use warnings; +use Carp; use C4::Input; use C4::Auth; @@ -184,9 +185,21 @@ sub printbasketgrouppdf{ my ($basketgroupid) = @_; my $pdfformat = C4::Context->preference("OrderPdfFormat"); - eval "use $pdfformat"; - # FIXME consider what would happen if $pdfformat does not - # contain the name of a valid Perl module. + if ($pdfformat eq 'pdfformat::layout3pages' || $pdfformat eq 'pdfformat::layout2pages'){ + eval { + require $pdfformat; + import $pdfformat; + }; + if ($@){ + } + } + else { + print $input->header; + print $input->start_html; # FIXME Should do a nicer page + print "