Bug 10711: make GetOfflineOperation() return $sth->fetchrow_hashref instead of $result
authorKenza Zaki <kenza.zaki@biblibre.com>
Mon, 12 Aug 2013 12:40:50 +0000 (14:40 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 9 Oct 2013 03:43:03 +0000 (03:43 +0000)
To test :
prove t/db_dependent/Circulation_OfflineOperation.t
t/db_dependent/Circulation_OfflineOperation.t .. ok
All tests successful.
Files=1, Tests=7, 19 wallclock secs ( 0.02 usr  0.01 sys +  0.24 cusr  0.02 csys =  0.29 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: applied 10681 and 10710 before 10711
prove t/db_dependent/Circulation_OfflineOperation.t run without errors
koha-qa reports only 2 tabulations, fixed in a follow-up

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Circulation.pm

index 39d9ed2..80b9e74 100644 (file)
@@ -3317,11 +3317,12 @@ sub GetOfflineOperations {
 }
 
 sub GetOfflineOperation {
+       my $operationid = shift;
+       return unless $operationid;
     my $dbh = C4::Context->dbh;
     my $sth = $dbh->prepare("SELECT * FROM pending_offline_operations WHERE operationid=?");
-    $sth->execute( shift );
-    my $result = $sth->fetchrow_hashref;
-    return $result;
+    $sth->execute( $operationid );
+    return $sth->fetchrow_hashref;
 }
 
 sub AddOfflineOperation {