[Koha-devel] using new templates for exporting basketgroups in pdf
Mathieu Saby
mathieu.saby at univ-rennes2.fr
Tue Dec 11 18:33:04 CET 2012
Hello
Our library has created a new templates for exporting basketgroups in
pdf (translated in french, and showing fields more usefull for us in
the tables than "layout2pages" and "layout3pages").
Of course, we could name this template "layout3pages", and replace the
standard template. But I think it would be "cleaner" to add this give
this new template a name of his own, so it won't be altered when our
Koha is updated.
The problem is some code in /acqui/basketgroup.pl prevents us to do
that. The only 2 valid templates for exporting basketgroups in pdf are
be "layout2pages" and "layout3pages". And we want to edit perl files as
less as possible.
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=acqui/basketgroup.pl;h=6b7e5bf192a7b5cfa6761dc750bfc9fe5904bf60;hb=HEAD
188 if ($pdfformat eq 'pdfformat::layout3pages' || $pdfformat eq
'pdfformat::layout2pages'){
189 eval {
190 eval "require $pdfformat";
191 import $pdfformat;
192 };
193 if ($@){
194 }
195 }
196 else {
197 print $input->header;
198 print $input->start_html; # FIXME Should do a nicer page
199 print "<h1>Invalid PDF Format set</h1>";
200 print "Please go to the systempreferences and set a valid
pdfformat";
201 exit;
202 }
This code was added by this Chris Cormack's commit : "Bug 6679 Fix
scripts in admin & acqui to pass Perl::Critic"
http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=7cdea5de355e853f25300821cc641672443177de
added
So, here is my question :
Is this "security" in code really necessary ? And if it is, is there a
way to make it more flexible ?
Regards,
M. Saby
Rennes 2 University
--
Mathieu Saby
Service d'Informatique Documentaire
Service Commun de la Documentation
Université Rennes 2
Téléphone : 02 99 14 12 65
Courriel : mathieu.saby at univ-rennes2.fr
More information about the Koha-devel
mailing list