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

Robert Lyon bob at katipo.co.nz
Mon Nov 27 20:49:09 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Robert Lyon <bob_lyon>	06/11/27 19:49:08

Modified files:
	C4             : Bull.pm 

Log message:
	Fixing the problem with undefined librarian notes making the insert into subscriptionhistory fail

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Bull.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.6.2.35&r2=1.6.2.36

Patches:
Index: Bull.pm
===================================================================
RCS file: /sources/koha/koha/C4/Attic/Bull.pm,v
retrieving revision 1.6.2.35
retrieving revision 1.6.2.36
diff -u -b -r1.6.2.35 -r1.6.2.36
--- Bull.pm	24 Nov 2006 00:23:22 -0000	1.6.2.35
+++ Bull.pm	27 Nov 2006 19:49:08 -0000	1.6.2.36
@@ -326,6 +326,7 @@
 	 				$numberingmethod, $status, $notes);
 	#then create the 1st waited number
 	my $subscriptionid = $dbh->{'mysql_insertid'};
+        if(!(defined($notes))){ $notes = ''; } # as librariannote can't be null
 	$sth = $dbh->prepare("insert into subscriptionhistory (biblionumber, subscriptionid, histstartdate, enddate, missinglist, recievedlist, opacnote, librariannote) values (?,?,?,?,?,?,?,?)");
 	$sth->execute($biblionumber, $subscriptionid, format_date_in_iso($startdate), 0, "", "", "", $notes);
 	# reread subscription to get a hash (for calculation of the 1st issue number)
@@ -1234,6 +1235,7 @@
     #then create the 1st waited number
     my $subscriptionid = $dbh->{'mysql_insertid'};
     my $enddate        = GetSubscriptionExpirationDate($subscriptionid);
+    if(!(defined($notes))){ $notes = ''; } # as librariannote can't be null
 
     $sth =
         $dbh->prepare(





More information about the Koha-cvs mailing list