projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://lx-office/~/lx-office-erp
[kivitendo-erp.git]
/
SL
/
BP.pm
diff --git
a/SL/BP.pm
b/SL/BP.pm
index
559ea22
..
9365d23
100644
(file)
--- a/
SL/BP.pm
+++ b/
SL/BP.pm
@@
-62,8
+62,6
@@
sub get_vc {
qq| WHERE a.${vc}_id = vc.id AND s.trans_id = a.id AND s.formname = ? | .
qq| AND s.spoolfile IS NOT NULL) AS total|;
qq| WHERE a.${vc}_id = vc.id AND s.trans_id = a.id AND s.formname = ? | .
qq| AND s.spoolfile IS NOT NULL) AS total|;
- $main::lxdebug->message(0, "kuh1 $query");
-
my ($count) = selectrow_query($form, $dbh, $query, $form->{type});
# build selection list
my ($count) = selectrow_query($form, $dbh, $query, $form->{type});
# build selection list
@@
-82,8
+80,6
@@
sub get_vc {
push @{ $form->{"all_${vc}"} }, $ref;
}
$sth->finish;
push @{ $form->{"all_${vc}"} }, $ref;
}
$sth->finish;
-
- $main::lxdebug->message(0, "kuh2 $query");
}
$dbh->disconnect;
}
$dbh->disconnect;
@@
-267,7
+263,7
@@
sub delete_spool {
sub print_spool {
$main::lxdebug->enter_sub();
sub print_spool {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $spool) = @_;
+ my ($self, $myconfig, $form, $spool
, $output
) = @_;
# connect to database
my $dbh = $form->dbconnect($myconfig);
# connect to database
my $dbh = $form->dbconnect($myconfig);
@@
-279,8
+275,10
@@
sub print_spool {
foreach my $i (1 .. $form->{rowcount}) {
if ($form->{"checked_$i"}) {
foreach my $i (1 .. $form->{rowcount}) {
if ($form->{"checked_$i"}) {
- open(OUT, $form->{OUT}) or $form->error("$form->{OUT} : $!");
+ # $output is safe ( = does not come directly from the browser).
+ open(OUT, $output) or $form->error("$output : $!");
+ $form->{"spoolfile_$i"} =~ s|.*/||;
$spoolfile = qq|$spool/$form->{"spoolfile_$i"}|;
# send file to printer
$spoolfile = qq|$spool/$form->{"spoolfile_$i"}|;
# send file to printer