X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FReports%2FGuided.pm;h=9447c7185a4c1ef3049bb6f0ba423a4616095cc6;hb=300918e4886433f9f5b52779d8cf2027fcbdcb1a;hp=f0db7a37194df052bc793555e5ce3778c175e763;hpb=d46657f8af980524a4351e40abe0b901d1af3e6a;p=koha-ffzg.git diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index f0db7a3719..9447c7185a 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -609,13 +609,13 @@ sub format_results { } sub delete_report { - my ($id) = @_; - my $dbh = C4::Context->dbh(); - my $query = "DELETE FROM saved_sql WHERE id = ?"; - my $sth = $dbh->prepare($query); - $sth->execute($id); -} - + my (@ids) = @_; + my $dbh = C4::Context->dbh; + my $query = 'DELETE FROM saved_sql WHERE id IN (' . join( ',', ('?') x @ids ) . ')'; + my $sth = $dbh->prepare($query); + $sth->execute(@ids); + $sth->finish; +} my $SAVED_REPORTS_BASE_QRY = <