Bug 3134: (follow-up) Reindent delete_report
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 21 Aug 2013 08:35:02 +0000 (10:35 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 21 Aug 2013 14:30:29 +0000 (14:30 +0000)
The first patch add a bad indentation for this routine. This patch fixes
that.

Also, the $sth->finish statement is useless and was removed.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

C4/Reports/Guided.pm

index 9447c71..befc777 100644 (file)
@@ -610,11 +610,10 @@ sub format_results {
 
 sub delete_report {
     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 $dbh = C4::Context->dbh;
+    my $query = 'DELETE FROM saved_sql WHERE id IN (' . join( ',', ('?') x @ids ) . ')';
+    my $sth = $dbh->prepare($query);
+    $sth->execute(@ids);
 }
 
 my $SAVED_REPORTS_BASE_QRY = <<EOQ;