removing dbh from signature.
---
 C4/ImportBatch.pm      |    2 +-
 C4/Items.pm            |   12 ++++++------
 cataloguing/additem.pl |    2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm
index 9f9c7f6..fc67065 100644
--- a/C4/ImportBatch.pm
+++ b/C4/ImportBatch.pm
@@ -682,7 +682,7 @@ sub BatchRevertItems {
     $sth->bind_param(1, $import_record_id);
     $sth->execute();
     while (my $row = $sth->fetchrow_hashref()) {
-        DelItem($dbh, $biblionumber, $row->{'itemnumber'});
+        DelItem($biblionumber, $row->{'itemnumber'});
         my $updsth = $dbh->prepare("UPDATE import_items SET status = ? WHERE 
import_items_id = ?");
         $updsth->bind_param(1, 'reverted');
         $updsth->bind_param(2, $row->{'import_items_id'});
diff --git a/C4/Items.pm b/C4/Items.pm
index 464aedc..2dd28ef 100644
--- a/C4/Items.pm
+++ b/C4/Items.pm
@@ -508,11 +508,11 @@ Exported function (core API) for deleting an item record 
in Koha.
 =cut
 
 sub DelItem {
-    my ( $dbh, $biblionumber, $itemnumber ) = @_;
-    
+    my ( $biblionumber, $itemnumber ) = @_;
+    my $dbh=C4::Context->dbh;
     # FIXME check the item has no current issues
     
-    _koha_delete_item( $dbh, $itemnumber );
+    _koha_delete_item( $itemnumber );
 
     # get the MARC record
     my $record = GetMarcBiblio($biblionumber);
@@ -1873,7 +1873,7 @@ sub _koha_modify_item {
 
 =over 4
 
-_koha_delete_item( $dbh, $itemnum );
+_koha_delete_item( $itemnum );
 
 =back
 
@@ -1882,8 +1882,8 @@ Internal function to delete an item record from the koha 
tables
 =cut
 
 sub _koha_delete_item {
-    my ( $dbh, $itemnum ) = @_;
-
+    my ( $itemnum ) = @_;
+    my $dbh=C4::Context->dbh;
     # save the deleted item to deleteditems table
     my $sth = $dbh->prepare("SELECT * FROM items WHERE itemnumber=?");
     $sth->execute($itemnum);
diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
index 9d97afb..496c17f 100755
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -150,7 +150,7 @@ if ($op eq "additem") {
                        $nextop="additem";
                }
                else {
-                       &DelItem($dbh,$biblionumber,$itemnumber);
+                       &DelItem($biblionumber,$itemnumber);
                        print 
$input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode");
                }
     }
-- 
1.5.4.3


_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to