Bug 4188 Valid PDF file name when printing basket group with no name
[koha_gimpoz] / C4 / Review.pm
index 163efc6..0b7dbc3 100644 (file)
@@ -13,11 +13,13 @@ package C4::Review;
 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 use strict;
+use warnings;
+
 use C4::Context;
 
 use vars qw($VERSION @ISA @EXPORT);
@@ -67,9 +69,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 +80,6 @@ sub savereview {
   (?,?,?,0,now())";
     my $sth = $dbh->prepare($query);
     $sth->execute( $borrowernumber, $biblionumber, $review);
-    $sth->finish();
 }
 
 sub updatereview {
@@ -89,7 +88,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 +136,6 @@ sub approvereview {
                WHERE reviewid=?";
     my $sth = $dbh->prepare($query);
     $sth->execute( 1, $reviewid );
-    $sth->finish();
 }
 
 =head2 deletereview
@@ -156,7 +153,6 @@ sub deletereview {
                WHERE reviewid=?";
     my $sth = $dbh->prepare($query);
     $sth->execute($reviewid);
-    $sth->finish();
 }
 
 1;