X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FRotatingCollections.pm;h=d6fad87b377d38cfd6a2f1ad58e0f5af346ed02f;hb=5d6c092921919526ade501facb1220f8a108a08f;hp=b5768680744659c3328502a137b8f1c50279f3be;hpb=a8222aeeb1169d7b1939d1e64c319a16e3846e8c;p=koha_fer diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm index b576868074..d6fad87b37 100644 --- a/C4/RotatingCollections.pm +++ b/C4/RotatingCollections.pm @@ -37,7 +37,7 @@ use Data::Dumper; use vars qw($VERSION @ISA @EXPORT); # set the version for version checking -$VERSION = 0.01; +$VERSION = 3.07.00.049; =head1 NAME @@ -99,7 +99,6 @@ sub CreateCollection { $sth = $dbh->prepare("INSERT INTO collections ( colId, colTitle, colDesc ) VALUES ( NULL, ?, ? )"); $sth->execute( $title, $description ) or return ( 0, 3, $sth->errstr() ); - $sth->finish; return 1; @@ -145,7 +144,6 @@ sub UpdateCollection { colTitle = ?, colDesc = ? WHERE colId = ?"); $sth->execute( $title, $description, $colId ) or return ( 0, 4, $sth->errstr() ); - $sth->finish; return 1; @@ -180,7 +178,6 @@ sub DeleteCollection { $sth = $dbh->prepare("DELETE FROM collections WHERE colId = ?"); $sth->execute( $colId ) or return ( 0, 4, $sth->errstr() ); - $sth->finish; return 1; } @@ -211,8 +208,6 @@ sub GetCollections { push( @results , $row ); } - $sth->finish; - return \@results; } @@ -259,8 +254,6 @@ sub GetItemsInCollection { push( @results , $row ); } - $sth->finish; - return \@results; } @@ -288,8 +281,6 @@ sub GetCollection { my $row = $sth->fetchrow_hashref; - $sth->finish; - return ( $$row{'colId'}, $$row{'colTitle'}, @@ -335,10 +326,9 @@ sub AddItemToCollection { my $dbh = C4::Context->dbh; my $sth; - $sth = $dbh->prepare("INSERT INTO collections_tracking ( ctId, colId, itemnumber ) + $sth = $dbh->prepare("INSERT INTO collections_tracking ( collections_tracking_id, colId, itemnumber ) VALUES ( NULL, ?, ? )"); $sth->execute( $colId, $itemnumber ) or return ( 0, 3, $sth->errstr() ); - $sth->finish; return 1; @@ -379,7 +369,6 @@ sub RemoveItemFromCollection { $sth = $dbh->prepare("DELETE FROM collections_tracking WHERE itemnumber = ?"); $sth->execute( $itemnumber ) or return ( 0, 3, $sth->errstr() ); - $sth->finish; return 1; } @@ -420,7 +409,6 @@ sub TransferCollection { colBranchcode = ? WHERE colId = ?"); $sth->execute( $colBranchcode, $colId ) or return ( 0, 4, $sth->errstr() ); - $sth->finish; $sth = $dbh->prepare("SELECT barcode FROM items, collections_tracking WHERE items.itemnumber = collections_tracking.itemnumber @@ -430,9 +418,7 @@ sub TransferCollection { while ( my $item = $sth->fetchrow_hashref ) { my ( $dotransfer, $messages, $iteminformation ) = transferbook( $colBranchcode, $item->{'barcode'}, my $ignore_reserves = 1); } - - return 1; } @@ -461,8 +447,6 @@ sub GetCollectionItemBranches { my $row = $sth->fetchrow_hashref; - $sth->finish; - return ( $$row{'holdingbranch'}, $$row{'colBranchcode'}, @@ -505,8 +489,6 @@ sub isItemInAnyCollection { my $row = $sth->fetchrow_hashref; $itemnumber = $row->{itemnumber}; - $sth->finish; - if ( $itemnumber ) { return 1; } else {