[Koha-cvs] koha/C4 Breeding.pm [rel_2_2]

Joshua Ferraro jmf at kados.org
Fri Nov 3 04:30:24 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Joshua Ferraro <kados>	06/11/03 03:30:24

Modified files:
	C4             : Breeding.pm 

Log message:
	Major upgrade to the Z3950 client in Koha. It no longer requires the use of
	the processqueue daemon, but relies on ZOOM Perl's asynch searching. Thanks 
	to Tumer Garip for commiting this to dev_week and to Chris for helping me
	troubleshoot it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Breeding.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.7.2.2&r2=1.7.2.3

Patches:
Index: Breeding.pm
===================================================================
RCS file: /sources/koha/koha/C4/Breeding.pm,v
retrieving revision 1.7.2.2
retrieving revision 1.7.2.3
diff -u -b -r1.7.2.2 -r1.7.2.3
--- Breeding.pm	6 Oct 2006 15:33:37 -0000	1.7.2.2
+++ Breeding.pm	3 Nov 2006 03:30:24 -0000	1.7.2.3
@@ -70,6 +70,7 @@
 	my $alreadyindb = 0;
 	my $alreadyinfarm = 0;
 	my $notmarcrecord = 0;
+        my $breedingid;
 	for (my $i=0;$i<=$#marcarray;$i++) {
 		my $marcrecord = MARC::File::USMARC::decode($marcarray[$i]."\x1D");
 		my @warnings = $marcrecord->warnings();
@@ -100,7 +101,7 @@
 				$alreadyindb++;
 			} else {
 				# search in breeding farm
-				my $breedingid;
+
 				if ($oldbiblio->{isbn}) {
 					$searchbreeding->execute($oldbiblio->{isbn},$oldbiblio->{title});
 					($breedingid) = $searchbreeding->fetchrow;
@@ -117,13 +118,14 @@
 						$replacesql ->execute($filename,substr($oldbiblio->{isbn}.$oldbiblio->{issn},0,10),$oldbiblio->{title},$oldbiblio->{author},$recoded,$encoding,$z3950random,$breedingid);
 					} else {
 						$insertsql ->execute($filename,substr($oldbiblio->{isbn}.$oldbiblio->{issn},0,10),$oldbiblio->{title},$oldbiblio->{author},$recoded,$encoding,$z3950random);
+					$breedingid=$dbh->{'mysql_insertid'};
 					}
 					$imported++;
 				}
 			}
 		}
 	}
-	return ($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported);
+	return ($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported,$breedingid);
 }
 
 





More information about the Koha-cvs mailing list