projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
print_form: Extension war vor -r3314 standard auf "html", wurde dann durch anderen...
[kivitendo-erp.git]
/
bin
/
mozilla
/
bp.pl
diff --git
a/bin/mozilla/bp.pl
b/bin/mozilla/bp.pl
index
8054af5
..
654a267
100644
(file)
--- a/
bin/mozilla/bp.pl
+++ b/
bin/mozilla/bp.pl
@@
-33,6
+33,7
@@
use SL::BP;
use Data::Dumper;
use SL::BP;
use Data::Dumper;
+use List::Util qw(first);
1;
1;
@@
-348,7
+349,10
@@
sub print {
$form->get_lists(printers => 'ALL_PRINTERS');
# use the command stored in the databse or fall back to $myconfig{printer}
$form->get_lists(printers => 'ALL_PRINTERS');
# use the command stored in the databse or fall back to $myconfig{printer}
- my $selected_printer = (grep { $_->{id} eq $form->{printer} } @{ $form->{ALL_PRINTERS} })[0]->{'printer_command'} || $myconfig{printer};
+ my $selected_printer = first { $_ } map ({ $_ ->{printer_command} }
+ grep { $_->{id} eq $form->{printer} }
+ @{ $form->{ALL_PRINTERS} }),
+ $myconfig{printer};
if ($form->{callback}) {
map { $form->{callback} .= "&checked_$_=1" if $form->{"checked_$_"} }
if ($form->{callback}) {
map { $form->{callback} .= "&checked_$_=1" if $form->{"checked_$_"} }
@@
-608,7
+612,7
@@
sub list_spool {
$form->get_lists(printers=>"ALL_PRINTERS");
print qq|<select name="printer">|;
$form->get_lists(printers=>"ALL_PRINTERS");
print qq|<select name="printer">|;
-print map(qq|<option value="$_->{id}">| .
$form->quote_html
($_->{printer_description}) . qq|</option>|, @{ $form->{ALL_PRINTERS} });
+print map(qq|<option value="$_->{id}">| .
H
($_->{printer_description}) . qq|</option>|, @{ $form->{ALL_PRINTERS} });
print qq|</select>|;
# }
print qq|</select>|;
# }