From: Moritz Bunkus Date: Fri, 13 Apr 2007 08:30:03 +0000 (+0000) Subject: $form->{printers} ist ein Array, und kein Hash. Außerdem die Drucker-Drop-Down-Box... X-Git-Tag: release-2.4.3^2~504 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=209f6291c32e88d454c9018f2b4c98f994805239;p=kivitendo-erp.git $form->{printers} ist ein Array, und kein Hash. Außerdem die Drucker-Drop-Down-Box nur dann anzeigen, wenn Drucker angelegt wurden. --- diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index b49106d20..6a57794fd 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1498,7 +1498,7 @@ sub print_options { push @MEDIA, grep $_, opthash("screen", $form->{OP}{screen}, $locale->text('Screen')), - (scalar keys %{ $form->{printers} } && $latex_templates) ? + (scalar @{ $form->{printers} } && $latex_templates) ? opthash("printer", $form->{OP}{printer}, $locale->text('Printer')) : undef, ($latex_templates) ? opthash("queue", $form->{OP}{queue}, $locale->text('Queue')) : undef @@ -1521,12 +1521,12 @@ sub print_options { push @PRINTER_ID, map { opthash($_->{id}, ($_->{id} eq $form->{printer_id} ? 'selected' : ''), $_->{printer_description}) } +{}, @{ $form->{printers} } - if (ref $form->{printers} eq 'ARRAY'); + if ((ref $form->{printers} eq 'ARRAY') && scalar @{ $form->{printers } }); @SELECTS = map { sname => lc $_, DATA => \@$_, show => scalar @$_ }, qw(FORMNAME LANGUAGE_ID FORMAT SENDMODE MEDIA PRINTER_ID); %template_vars = ( - display_copies => scalar keys %{ $form->{printers} } && $latex_templates && $form->{media} ne 'email', + display_copies => scalar @{ $form->{printers} } && $latex_templates && $form->{media} ne 'email', display_remove_draft => (!$form->{id} && $form->{draft_id}), groupitems_checked => $form->{groupitems} ? "checked" : '', remove_draft_checked => $form->{remove_draft} ? "checked" : ''