From: Sven Schöling Date: Thu, 5 Nov 2009 16:48:03 +0000 (+0100) Subject: Alle Vorkommen von all_departments abgesichert. X-Git-Tag: release-2.6.1beta1~117 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e2b9e1737230c4e4209904784808dcaec723f730;p=kivitendo-erp.git Alle Vorkommen von all_departments abgesichert. --- 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} = "