From 209f6291c32e88d454c9018f2b4c98f994805239 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 13 Apr 2007 08:30:03 +0000 Subject: [PATCH] =?utf8?q?$form->{printers}=20ist=20ein=20Array,=20und=20k?= =?utf8?q?ein=20Hash.=20Au=C3=9Ferdem=20die=20Drucker-Drop-Down-Box=20nur?= =?utf8?q?=20dann=20anzeigen,=20wenn=20Drucker=20angelegt=20wurden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/io.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" : '' -- 2.20.1