[Koha-cvs] koha/misc/migration_tools bulkmarcimport.pl

Joshua Ferraro jmf at kados.org
Mon Feb 27 02:06:30 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	
Changes by:	Joshua Ferraro <kados at savannah.gnu.org>	06/02/27 01:06:30

Modified files:
	misc/migration_tools: bulkmarcimport.pl 

Log message:
	removed Zconns, no need for them anymore with new Context.pm setup

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/misc/migration_tools/bulkmarcimport.pl.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: koha/misc/migration_tools/bulkmarcimport.pl
diff -u koha/misc/migration_tools/bulkmarcimport.pl:1.4 koha/misc/migration_tools/bulkmarcimport.pl:1.5
--- koha/misc/migration_tools/bulkmarcimport.pl:1.4	Sat Feb 25 23:40:59 2006
+++ koha/misc/migration_tools/bulkmarcimport.pl	Mon Feb 27 01:06:30 2006
@@ -13,8 +13,6 @@
 
 use Getopt::Long;
 
-my $Zconn = C4::Context->Zconn or die "unable to set Zconn";
-
 my ( $input_marc_file, $number) = ('',0);
 my ($version, $delete, $test_parameter,$char_encoding, $verbose, $commit);
 
@@ -98,7 +96,7 @@
 	$i++;
 
 	if ($i==$number) {
-		z3950_extended_services($Zconn,'commit',set_service_options('commit'));
+		z3950_extended_services('commit',set_service_options('commit'));
 		print "COMMIT OPERATION SUCCESSFUL\n";
 
 		my $timeneeded = gettimeofday - $starttime;
@@ -106,7 +104,7 @@
 	}
 	# perform the commit operation ever so often
 	if ($i==$commit) {
-		z3950_extended_services($Zconn,'commit',set_service_options('commit'));
+		z3950_extended_services('commit',set_service_options('commit'));
 		$commit+=$commitnum;
 		print "COMMIT OPERATION SUCCESSFUL\n";
 	}
@@ -162,15 +160,15 @@
 	print "$i : $nbitems items found\n" if $verbose;
 	# now, create biblio and items with NEWnewXX call.
 	unless ($test_parameter) {
-		my ($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$Zconn,$newRecord,'');
+		my ($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$newRecord,'');
 		warn "ADDED biblio NB $bibid in DB\n" if $verbose;
 		for (my $i=0;$i<=$#items;$i++) {
-			NEWnewitem($dbh,$Zconn,$items[$i],$bibid);
+			NEWnewitem($dbh,$items[$i],$bibid);
 		}
 	}
 }
 # final commit of the changes
-z3950_extended_services($Zconn,'commit',set_service_options('commit'));
+z3950_extended_services('commit',set_service_options('commit'));
 print "COMMIT OPERATION SUCCESSFUL\n";
 
 my $timeneeded = gettimeofday - $starttime;





More information about the Koha-cvs mailing list