X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/59f8f1fad78635c084328f8bf726f107cbb5bba2..a4b22a8f008d6431597fa80de26bcb0fa10e8d7b:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index f7cf1a86b..842afe8af 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1451,8 +1451,16 @@ sub get_projects { if (!$all) { $where = "WHERE active "; if ($old_id) { - $where .= " OR (id = ?) "; - push(@values, $old_id); + if (ref($old_id) eq "ARRAY") { + my @ids = grep({ $_ } @{$old_id}); + if (@ids) { + $where .= " OR id IN (" . join(",", map({ "?" } @ids)) . ") "; + push(@values, @ids); + } + } else { + $where .= " OR (id = ?) "; + push(@values, $old_id); + } } }