bug 5327 added unit test for C4/Csv.pm
[koha.git] / cataloguing / merge.pl
index c97ca7a..0b881f1 100755 (executable)
@@ -2,6 +2,7 @@
 
 
 # Copyright 2009 BibLibre
+# Parts Copyright Catalyst IT 2011
 #
 # This file is part of Koha.
 #
@@ -26,6 +27,7 @@ use C4::Auth;
 use C4::Items;
 use C4::Biblio;
 use C4::Serials;
+use C4::Reserves qw/MergeHolds/;
 
 my $input = new CGI;
 my @biblionumber = $input->param('biblionumber');
@@ -100,6 +102,8 @@ if ($merge) {
 
     # Deleting the other record
     if (scalar(@errors) == 0) {
+       # Move holds
+       MergeHolds($dbh,$tobiblio,$frombiblio);
        my $error = DelBiblio($frombiblio);
        push @errors, $error if ($error); 
     }
@@ -246,8 +250,9 @@ Create a random value to set it into the input name
 
 =cut
 
-sub createKey(){
+sub createKey {
     return int(rand(1000000));
 }
 
 
+