From fddba9685c43dc0681047edce09b1f076ce93080 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Thu, 29 May 2008 08:59:25 -0500 Subject: [PATCH] minor cleanup, remove $sth->finish's. No documentation impact. For details: see http://search.cpan.org/~timb/DBI-1.14/DBI.pm "There's no need to call finish if you're about to destroy or re-execute the statement handle." In all these cases the sth is falling out of scope, about to be destroyed. Signed-off-by: Joshua Ferraro --- C4/Review.pm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/C4/Review.pm b/C4/Review.pm index 163efc621d..e08d24ccc5 100644 --- a/C4/Review.pm +++ b/C4/Review.pm @@ -67,9 +67,7 @@ sub getreview { "SELECT * FROM reviews WHERE biblionumber=? and borrowernumber=?"; my $sth = $dbh->prepare($query); $sth->execute( $biblionumber, $borrowernumber ); - my $review = $sth->fetchrow_hashref(); - $sth->finish(); - return $review; + return $sth->fetchrow_hashref(); } sub savereview { @@ -80,7 +78,6 @@ sub savereview { (?,?,?,0,now())"; my $sth = $dbh->prepare($query); $sth->execute( $borrowernumber, $biblionumber, $review); - $sth->finish(); } sub updatereview { @@ -89,7 +86,6 @@ sub updatereview { my $query = "UPDATE reviews SET review=?,datereviewed=now(),approved=0 WHERE borrowernumber=? and biblionumber=?"; my $sth = $dbh->prepare($query); $sth->execute( $review, $borrowernumber, $biblionumber ); - $sth->finish(); } sub numberofreviews { @@ -138,7 +134,6 @@ sub approvereview { WHERE reviewid=?"; my $sth = $dbh->prepare($query); $sth->execute( 1, $reviewid ); - $sth->finish(); } =head2 deletereview @@ -156,7 +151,6 @@ sub deletereview { WHERE reviewid=?"; my $sth = $dbh->prepare($query); $sth->execute($reviewid); - $sth->finish(); } 1; -- 2.39.5