From e2b9e1737230c4e4209904784808dcaec723f730 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 5 Nov 2009 17:48:03 +0100 Subject: [PATCH] Alle Vorkommen von all_departments abgesichert. --- SL/Form.pm | 2 +- bin/mozilla/ap.pl | 8 ++++---- bin/mozilla/ar.pl | 12 ++++++------ bin/mozilla/ca.pl | 2 +- bin/mozilla/cp.pl | 4 ++-- bin/mozilla/dn.pl | 2 +- bin/mozilla/gl.pl | 12 ++++++------ bin/mozilla/ir.pl | 2 +- bin/mozilla/is.pl | 2 +- bin/mozilla/rp.pl | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 1668252fb..579b1ef65 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2740,7 +2740,7 @@ sub all_departments { ORDER BY description|; $self->{all_departments} = selectall_hashref_query($self, $dbh, $query); - delete($self->{all_departments}) unless (@{ $self->{all_departments} }); + delete($self->{all_departments}) unless (@{ $self->{all_departments} || [] }); $main::lxdebug->leave_sub(); } diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 8f643e57e..80680efc6 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -170,14 +170,14 @@ sub create_links { } # departments - if (@{ $form->{all_departments} }) { + if (@{ $form->{all_departments} || [] }) { $form->{selectdepartment} = "\n" - } (@{ $form->{all_departments} }); + } (@{ $form->{all_departments} || [] }); } $form->{employee} = "$form->{employee}--$form->{employee_id}"; diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 25c8bcc4e..5099c8995 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -156,7 +156,7 @@ sub report { $form->all_departments(\%myconfig); if (@{ $form->{all_departments} || [] }) { $form->{selectdepartment} = "