Revision 9d6beb5d
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
SL/FU.pm | ||
---|---|---|
181 | 181 |
my ($query, $where, $where_user); |
182 | 182 |
|
183 | 183 |
my ($employee_id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $form->{login}); |
184 |
my @values = ($employee_id, $employee_id); |
|
184 |
my @values = (); |
|
185 |
my @values_user = (); |
|
185 | 186 |
|
186 | 187 |
if ($params{trans_id}) { |
187 | 188 |
$where .= qq| AND EXISTS (SELECT * FROM follow_up_links ful |
... | ... | |
238 | 239 |
|
239 | 240 |
if ($params{all_users}) { |
240 | 241 |
$where_user = qq|OR (fu.created_by IN (SELECT DISTINCT what FROM follow_up_access WHERE who = ?))|; |
241 |
push @values, $employee_id; |
|
242 |
push @values_user, $employee_id;
|
|
242 | 243 |
} |
243 | 244 |
|
244 | 245 |
my $order_by = ''; |
... | ... | |
269 | 270 |
$where |
270 | 271 |
$order_by|; |
271 | 272 |
|
272 |
my $follow_ups = selectall_hashref_query($form, $dbh, $query, @values); |
|
273 |
my $follow_ups = selectall_hashref_query($form, $dbh, $query, $employee_id, $employee_id, @values_user, @values);
|
|
273 | 274 |
|
274 | 275 |
if (!scalar @{ $follow_ups }) { |
275 | 276 |
$main::lxdebug->leave_sub(); |
Auch abrufbar als: Unified diff
Falsche Reihenfolge der SQL-Parameter sorgten für Fehlermeldungen, wenn z.B. nach Betreff gesucht wurde.