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

Joshua Ferraro jmf at kados.org
Sat Feb 25 01:33:59 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	Joshua Ferraro <kados at savannah.gnu.org>	06/02/25 00:33:59

Modified files:
	C4             : Biblio.pm 

Log message:
	VERY IMPORTANT BUGFIX: before this, if a blank MARC tag or subfield
	was submitted, it would be saved. This fix checks to see if it is
	blank and if not allows it to be saved.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Biblio.pm.diff?only_with_tag=rel_2_2&tr1=1.115.2.31&tr2=1.115.2.32&r1=text&r2=text

Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.115.2.31 koha/C4/Biblio.pm:1.115.2.32
--- koha/C4/Biblio.pm:1.115.2.31	Thu Feb 23 08:39:11 2006
+++ koha/C4/Biblio.pm	Sat Feb 25 00:33:59 2006
@@ -1045,6 +1045,9 @@
 	my $prevvalue; # if tag <10
 	my $field; # if tag >=10
 	for (my $i=0; $i< @$rtags; $i++) {
+	if ( @$rvalues[$i] eq "" ) {
+	# DO NOTHING, THIS IS A BLANK FIELD
+	} else {
 		# rebuild MARC::Record
 # 			warn "0=>".@$rtags[$i].@$rsubfields[$i]." = ".@$rvalues[$i].": ";
 		if (@$rtags[$i] ne $prevtag) {
@@ -1083,6 +1086,7 @@
 			$prevtag= @$rtags[$i];
 		}
 	}
+	}
 	# the last has not been included inside the loop... do it now !
 	$record->add_fields($field) if $field;
 # 	warn "HTML2MARC=".$record->as_formatted;
@@ -2920,8 +2924,13 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.115.2.31 2006/02/23 08:39:11 kados Exp $
+# $Id: Biblio.pm,v 1.115.2.32 2006/02/25 00:33:59 kados Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.115.2.32  2006/02/25 00:33:59  kados
+# VERY IMPORTANT BUGFIX: before this, if a blank MARC tag or subfield
+# was submitted, it would be saved. This fix checks to see if it is
+# blank and if not allows it to be saved.
+#
 # Revision 1.115.2.31  2006/02/23 08:39:11  kados
 # Fix for splitting up fixed fields containing | in them causing
 # incorrect storage of fixed fields in Koha DB.





More information about the Koha-cvs mailing list