From: Moritz Bunkus Date: Mon, 11 Aug 2008 08:32:08 +0000 (+0000) Subject: Falsche Reihenfolge der SQL-Parameter sorgten für Fehlermeldungen, wenn z.B. nach... X-Git-Tag: release-2.6.0beta1~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9d6beb5df35b06f0d9d2dffcdcfdf6a808722fce;p=kivitendo-erp.git Falsche Reihenfolge der SQL-Parameter sorgten für Fehlermeldungen, wenn z.B. nach Betreff gesucht wurde. --- diff --git a/SL/FU.pm b/SL/FU.pm index c34a03129..b8edf580c 100644 --- a/SL/FU.pm +++ b/SL/FU.pm @@ -181,7 +181,8 @@ sub follow_ups { my ($query, $where, $where_user); my ($employee_id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $form->{login}); - my @values = ($employee_id, $employee_id); + my @values = (); + my @values_user = (); if ($params{trans_id}) { $where .= qq| AND EXISTS (SELECT * FROM follow_up_links ful @@ -238,7 +239,7 @@ sub follow_ups { if ($params{all_users}) { $where_user = qq|OR (fu.created_by IN (SELECT DISTINCT what FROM follow_up_access WHERE who = ?))|; - push @values, $employee_id; + push @values_user, $employee_id; } my $order_by = ''; @@ -269,7 +270,7 @@ sub follow_ups { $where $order_by|; - my $follow_ups = selectall_hashref_query($form, $dbh, $query, @values); + my $follow_ups = selectall_hashref_query($form, $dbh, $query, $employee_id, $employee_id, @values_user, @values); if (!scalar @{ $follow_ups }) { $main::lxdebug->leave_sub();