From bf0fb98e6ccc69a822a4af11aded20d9eae4867d Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 9 Jan 2008 13:10:21 -0600 Subject: [PATCH] Fix for bug 1624 Signed-off-by: Joshua Ferraro --- C4/Review.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/C4/Review.pm b/C4/Review.pm index 6d3f6c8182..3d0da03e57 100644 --- a/C4/Review.pm +++ b/C4/Review.pm @@ -77,19 +77,18 @@ sub savereview { my $dbh = C4::Context->dbh; my $query = "INSERT INTO reviews (borrowernumber,biblionumber, review,approved,datereviewed) VALUES - (?,?,?,?,now())"; + (?,?,?,0,now())"; my $sth = $dbh->prepare($query); - $sth->execute( $borrowernumber, $biblionumber, $review, 0 ); + $sth->execute( $borrowernumber, $biblionumber, $review); $sth->finish(); } sub updatereview { my ( $biblionumber, $borrowernumber, $review ) = @_; my $dbh = C4::Context->dbh; - my $query = "UPDATE reviews SET review=?,datereviewed=now(),approved=? - WHERE borrowernumber=? and biblionumber=?"; + my $query = "UPDATE reviews SET review=?,datereviewed=now(),approved=0 WHERE borrowernumber=? and biblionumber=?"; my $sth = $dbh->prepare($query); - $sth->execute( $review, 0, $borrowernumber, $biblionumber ); + $sth->execute( $review, $borrowernumber, $biblionumber ); $sth->finish(); } -- 2.39.5